]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/channel.ts
Set sort refractoring
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / channel.ts
index cc00d9f8de5116443d84a236b39a2d438025d637..2012575c8676fe0f3d76ba7d55c6082de06c3047 100644 (file)
@@ -1,20 +1,14 @@
 import * as express from 'express'
 import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared'
-import { getFormattedObjects, logger, resetSequelizeInstance, retryTransactionWrapper } from '../../../helpers'
+import { retryTransactionWrapper } from '../../../helpers/database-utils'
+import { logger } from '../../../helpers/logger'
+import { getFormattedObjects, resetSequelizeInstance } from '../../../helpers/utils'
 import { sequelizeTypescript } from '../../../initializers'
 import { setAsyncActorKeys } from '../../../lib/activitypub'
 import { createVideoChannel } from '../../../lib/video-channel'
 import {
-  asyncMiddleware,
-  authenticate,
-  listVideoAccountChannelsValidator,
-  paginationValidator,
-  setPagination,
-  setVideoChannelsSort,
-  videoChannelsAddValidator,
-  videoChannelsGetValidator,
-  videoChannelsRemoveValidator,
-  videoChannelsSortValidator,
+  asyncMiddleware, authenticate, listVideoAccountChannelsValidator, paginationValidator, setDefaultSort, setPagination,
+  videoChannelsAddValidator, videoChannelsGetValidator, videoChannelsRemoveValidator, videoChannelsSortValidator,
   videoChannelsUpdateValidator
 } from '../../../middlewares'
 import { AccountModel } from '../../../models/account/account'
@@ -25,7 +19,7 @@ const videoChannelRouter = express.Router()
 videoChannelRouter.get('/channels',
   paginationValidator,
   videoChannelsSortValidator,
-  setVideoChannelsSort,
+  setDefaultSort,
   setPagination,
   asyncMiddleware(listVideoChannels)
 )