diff options
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/abuse.ts | 6 | ||||
-rw-r--r-- | server/controllers/api/videos/channel.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/comment.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts index e78f0f6fc..91594490b 100644 --- a/server/controllers/api/videos/abuse.ts +++ b/server/controllers/api/videos/abuse.ts | |||
@@ -6,8 +6,8 @@ import { getFormattedObjects } from '../../../helpers/utils' | |||
6 | import { sequelizeTypescript } from '../../../initializers' | 6 | import { sequelizeTypescript } from '../../../initializers' |
7 | import { sendVideoAbuse } from '../../../lib/activitypub/send' | 7 | import { sendVideoAbuse } from '../../../lib/activitypub/send' |
8 | import { | 8 | import { |
9 | asyncMiddleware, authenticate, ensureUserHasRight, paginationValidator, setPagination, setVideoAbusesSort, | 9 | asyncMiddleware, authenticate, ensureUserHasRight, paginationValidator, setDefaultSort, setPagination, videoAbuseReportValidator, |
10 | videoAbuseReportValidator, videoAbusesSortValidator | 10 | videoAbusesSortValidator |
11 | } from '../../../middlewares' | 11 | } from '../../../middlewares' |
12 | import { AccountModel } from '../../../models/account/account' | 12 | import { AccountModel } from '../../../models/account/account' |
13 | import { VideoModel } from '../../../models/video/video' | 13 | import { VideoModel } from '../../../models/video/video' |
@@ -20,7 +20,7 @@ abuseVideoRouter.get('/abuse', | |||
20 | ensureUserHasRight(UserRight.MANAGE_VIDEO_ABUSES), | 20 | ensureUserHasRight(UserRight.MANAGE_VIDEO_ABUSES), |
21 | paginationValidator, | 21 | paginationValidator, |
22 | videoAbusesSortValidator, | 22 | videoAbusesSortValidator, |
23 | setVideoAbusesSort, | 23 | setDefaultSort, |
24 | setPagination, | 24 | setPagination, |
25 | asyncMiddleware(listVideoAbuses) | 25 | asyncMiddleware(listVideoAbuses) |
26 | ) | 26 | ) |
diff --git a/server/controllers/api/videos/channel.ts b/server/controllers/api/videos/channel.ts index 7c62b5476..2012575c8 100644 --- a/server/controllers/api/videos/channel.ts +++ b/server/controllers/api/videos/channel.ts | |||
@@ -7,7 +7,7 @@ import { sequelizeTypescript } from '../../../initializers' | |||
7 | import { setAsyncActorKeys } from '../../../lib/activitypub' | 7 | import { setAsyncActorKeys } from '../../../lib/activitypub' |
8 | import { createVideoChannel } from '../../../lib/video-channel' | 8 | import { createVideoChannel } from '../../../lib/video-channel' |
9 | import { | 9 | import { |
10 | asyncMiddleware, authenticate, listVideoAccountChannelsValidator, paginationValidator, setPagination, setVideoChannelsSort, | 10 | asyncMiddleware, authenticate, listVideoAccountChannelsValidator, paginationValidator, setDefaultSort, setPagination, |
11 | videoChannelsAddValidator, videoChannelsGetValidator, videoChannelsRemoveValidator, videoChannelsSortValidator, | 11 | videoChannelsAddValidator, videoChannelsGetValidator, videoChannelsRemoveValidator, videoChannelsSortValidator, |
12 | videoChannelsUpdateValidator | 12 | videoChannelsUpdateValidator |
13 | } from '../../../middlewares' | 13 | } from '../../../middlewares' |
@@ -19,7 +19,7 @@ const videoChannelRouter = express.Router() | |||
19 | videoChannelRouter.get('/channels', | 19 | videoChannelRouter.get('/channels', |
20 | paginationValidator, | 20 | paginationValidator, |
21 | videoChannelsSortValidator, | 21 | videoChannelsSortValidator, |
22 | setVideoChannelsSort, | 22 | setDefaultSort, |
23 | setPagination, | 23 | setPagination, |
24 | asyncMiddleware(listVideoChannels) | 24 | asyncMiddleware(listVideoChannels) |
25 | ) | 25 | ) |
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index 65fcf6b35..3c2727530 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts | |||
@@ -6,7 +6,7 @@ import { logger } from '../../../helpers/logger' | |||
6 | import { getFormattedObjects } from '../../../helpers/utils' | 6 | import { getFormattedObjects } from '../../../helpers/utils' |
7 | import { sequelizeTypescript } from '../../../initializers' | 7 | import { sequelizeTypescript } from '../../../initializers' |
8 | import { buildFormattedCommentTree, createVideoComment } from '../../../lib/video-comment' | 8 | import { buildFormattedCommentTree, createVideoComment } from '../../../lib/video-comment' |
9 | import { asyncMiddleware, authenticate, paginationValidator, setPagination, setVideoCommentThreadsSort } from '../../../middlewares' | 9 | import { asyncMiddleware, authenticate, paginationValidator, setDefaultSort, setPagination } from '../../../middlewares' |
10 | import { videoCommentThreadsSortValidator } from '../../../middlewares/validators' | 10 | import { videoCommentThreadsSortValidator } from '../../../middlewares/validators' |
11 | import { | 11 | import { |
12 | addVideoCommentReplyValidator, addVideoCommentThreadValidator, listVideoCommentThreadsValidator, listVideoThreadCommentsValidator, | 12 | addVideoCommentReplyValidator, addVideoCommentThreadValidator, listVideoCommentThreadsValidator, listVideoThreadCommentsValidator, |
@@ -20,7 +20,7 @@ const videoCommentRouter = express.Router() | |||
20 | videoCommentRouter.get('/:videoId/comment-threads', | 20 | videoCommentRouter.get('/:videoId/comment-threads', |
21 | paginationValidator, | 21 | paginationValidator, |
22 | videoCommentThreadsSortValidator, | 22 | videoCommentThreadsSortValidator, |
23 | setVideoCommentThreadsSort, | 23 | setDefaultSort, |
24 | setPagination, | 24 | setPagination, |
25 | asyncMiddleware(listVideoCommentThreadsValidator), | 25 | asyncMiddleware(listVideoCommentThreadsValidator), |
26 | asyncMiddleware(listVideoThreads) | 26 | asyncMiddleware(listVideoThreads) |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 368327914..6a7f1f184 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -14,7 +14,7 @@ import { fetchRemoteVideoDescription, getVideoActivityPubUrl, shareVideoByServer | |||
14 | import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send' | 14 | import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send' |
15 | import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler' | 15 | import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler' |
16 | import { | 16 | import { |
17 | asyncMiddleware, authenticate, paginationValidator, setPagination, setVideosSort, videosAddValidator, videosGetValidator, | 17 | asyncMiddleware, authenticate, paginationValidator, setDefaultSort, setPagination, videosAddValidator, videosGetValidator, |
18 | videosRemoveValidator, videosSearchValidator, videosSortValidator, videosUpdateValidator | 18 | videosRemoveValidator, videosSearchValidator, videosSortValidator, videosUpdateValidator |
19 | } from '../../../middlewares' | 19 | } from '../../../middlewares' |
20 | import { TagModel } from '../../../models/video/tag' | 20 | import { TagModel } from '../../../models/video/tag' |
@@ -44,7 +44,7 @@ videosRouter.get('/privacies', listVideoPrivacies) | |||
44 | videosRouter.get('/', | 44 | videosRouter.get('/', |
45 | paginationValidator, | 45 | paginationValidator, |
46 | videosSortValidator, | 46 | videosSortValidator, |
47 | setVideosSort, | 47 | setDefaultSort, |
48 | setPagination, | 48 | setPagination, |
49 | asyncMiddleware(listVideos) | 49 | asyncMiddleware(listVideos) |
50 | ) | 50 | ) |
@@ -52,7 +52,7 @@ videosRouter.get('/search', | |||
52 | videosSearchValidator, | 52 | videosSearchValidator, |
53 | paginationValidator, | 53 | paginationValidator, |
54 | videosSortValidator, | 54 | videosSortValidator, |
55 | setVideosSort, | 55 | setDefaultSort, |
56 | setPagination, | 56 | setPagination, |
57 | asyncMiddleware(searchVideos) | 57 | asyncMiddleware(searchVideos) |
58 | ) | 58 | ) |