X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fsort.ts;h=b76dab722d34d610430efa549f0c6333bb191ed5;hb=444c0a0e017824fb4ce526281a22c4abe0a13c50;hp=44295c3251868f597fc32fb14bf1f84d9508ac5e;hpb=c100a6142e6571312db9f6407698a21a08b593fb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/sort.ts b/server/middlewares/validators/sort.ts index 44295c325..b76dab722 100644 --- a/server/middlewares/validators/sort.ts +++ b/server/middlewares/validators/sort.ts @@ -1,4 +1,4 @@ -import { SORTABLE_COLUMNS } from '../../initializers' +import { SORTABLE_COLUMNS } from '../../initializers/constants' import { checkSort, createSortableColumns } from './utils' // Initialize constants here for better performances @@ -21,6 +21,9 @@ const SORTABLE_ACCOUNTS_BLOCKLIST_COLUMNS = createSortableColumns(SORTABLE_COLUM const SORTABLE_SERVERS_BLOCKLIST_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.SERVERS_BLOCKLIST) const SORTABLE_USER_NOTIFICATIONS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.USER_NOTIFICATIONS) const SORTABLE_VIDEO_PLAYLISTS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_PLAYLISTS) +const SORTABLE_PLUGINS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.PLUGINS) +const SORTABLE_AVAILABLE_PLUGINS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.AVAILABLE_PLUGINS) +const SORTABLE_VIDEO_REDUNDANCIES_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_REDUNDANCIES) const usersSortValidator = checkSort(SORTABLE_USERS_COLUMNS) const accountsSortValidator = checkSort(SORTABLE_ACCOUNTS_COLUMNS) @@ -41,6 +44,9 @@ const accountsBlocklistSortValidator = checkSort(SORTABLE_ACCOUNTS_BLOCKLIST_COL const serversBlocklistSortValidator = checkSort(SORTABLE_SERVERS_BLOCKLIST_COLUMNS) const userNotificationsSortValidator = checkSort(SORTABLE_USER_NOTIFICATIONS_COLUMNS) const videoPlaylistsSortValidator = checkSort(SORTABLE_VIDEO_PLAYLISTS_COLUMNS) +const pluginsSortValidator = checkSort(SORTABLE_PLUGINS_COLUMNS) +const availablePluginsSortValidator = checkSort(SORTABLE_AVAILABLE_PLUGINS_COLUMNS) +const videoRedundanciesSortValidator = checkSort(SORTABLE_VIDEO_REDUNDANCIES_COLUMNS) // --------------------------------------------------------------------------- @@ -59,9 +65,12 @@ export { videoCommentThreadsSortValidator, videoRatesSortValidator, userSubscriptionsSortValidator, + availablePluginsSortValidator, videoChannelsSearchSortValidator, accountsBlocklistSortValidator, serversBlocklistSortValidator, userNotificationsSortValidator, - videoPlaylistsSortValidator + videoPlaylistsSortValidator, + videoRedundanciesSortValidator, + pluginsSortValidator }