From 1174a8479ab9ee47b3305d668fe757435057a298 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Jan 2018 10:50:33 +0100 Subject: Set sort refractoring --- server/controllers/api/videos/comment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/api/videos/comment.ts') 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' import { getFormattedObjects } from '../../../helpers/utils' import { sequelizeTypescript } from '../../../initializers' import { buildFormattedCommentTree, createVideoComment } from '../../../lib/video-comment' -import { asyncMiddleware, authenticate, paginationValidator, setPagination, setVideoCommentThreadsSort } from '../../../middlewares' +import { asyncMiddleware, authenticate, paginationValidator, setDefaultSort, setPagination } from '../../../middlewares' import { videoCommentThreadsSortValidator } from '../../../middlewares/validators' import { addVideoCommentReplyValidator, addVideoCommentThreadValidator, listVideoCommentThreadsValidator, listVideoThreadCommentsValidator, @@ -20,7 +20,7 @@ const videoCommentRouter = express.Router() videoCommentRouter.get('/:videoId/comment-threads', paginationValidator, videoCommentThreadsSortValidator, - setVideoCommentThreadsSort, + setDefaultSort, setPagination, asyncMiddleware(listVideoCommentThreadsValidator), asyncMiddleware(listVideoThreads) -- cgit v1.2.3