-
-function usersSortValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
- checkSort(req, res, next, SORTABLE_USERS_COLUMNS)
-}
-
-function videoAbusesSortValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
- checkSort(req, res, next, SORTABLE_VIDEO_ABUSES_COLUMNS)
-}
-
-function videosSortValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
- checkSort(req, res, next, SORTABLE_VIDEOS_COLUMNS)
-}
+const SORTABLE_VIDEO_COMMENT_THREADS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_COMMENT_THREADS)
+const SORTABLE_BLACKLISTS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.BLACKLISTS)
+const SORTABLE_VIDEO_CHANNELS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_CHANNELS)
+const SORTABLE_FOLLOWERS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.FOLLOWERS)
+const SORTABLE_FOLLOWING_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.FOLLOWING)
+
+const usersSortValidator = checkSort(SORTABLE_USERS_COLUMNS)
+const accountsSortValidator = checkSort(SORTABLE_ACCOUNTS_COLUMNS)
+const jobsSortValidator = checkSort(SORTABLE_JOBS_COLUMNS)
+const videoAbusesSortValidator = checkSort(SORTABLE_VIDEO_ABUSES_COLUMNS)
+const videosSortValidator = checkSort(SORTABLE_VIDEOS_COLUMNS)
+const videoCommentThreadsSortValidator = checkSort(SORTABLE_VIDEO_COMMENT_THREADS_COLUMNS)
+const blacklistSortValidator = checkSort(SORTABLE_BLACKLISTS_COLUMNS)
+const videoChannelsSortValidator = checkSort(SORTABLE_VIDEO_CHANNELS_COLUMNS)
+const followersSortValidator = checkSort(SORTABLE_FOLLOWERS_COLUMNS)
+const followingSortValidator = checkSort(SORTABLE_FOLLOWING_COLUMNS)