sepia-search-motore-di-rice.../server/middlewares/validators/sort.ts

16 lines
622 B
TypeScript
Raw Normal View History

2020-02-14 16:14:45 +01:00
import { SORTABLE_COLUMNS } from '../../initializers/constants'
import { checkSort, createSortableColumns } from './utils'
const SORTABLE_VIDEOS_SEARCH_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEOS_SEARCH)
2020-02-19 15:39:35 +01:00
const SORTABLE_CHANNELS_SEARCH_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.CHANNELS_SEARCH)
2020-02-14 16:14:45 +01:00
const videosSearchSortValidator = checkSort(SORTABLE_VIDEOS_SEARCH_COLUMNS)
const channelsSearchSortValidator = checkSort(SORTABLE_CHANNELS_SEARCH_COLUMNS)
2020-02-14 16:14:45 +01:00
2020-02-13 11:49:03 +01:00
// ---------------------------------------------------------------------------
export {
2020-02-19 15:39:35 +01:00
videosSearchSortValidator,
channelsSearchSortValidator
2020-02-13 11:49:03 +01:00
}