]>
Commit | Line | Data |
---|---|---|
1 | import { SORTABLE_COLUMNS } from '../../initializers' | |
2 | import { checkSort, createSortableColumns } from './utils' | |
3 | ||
4 | // Initialize constants here for better performances | |
5 | const SORTABLE_USERS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.USERS) | |
6 | const SORTABLE_ACCOUNTS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.ACCOUNTS) | |
7 | const SORTABLE_JOBS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.JOBS) | |
8 | const SORTABLE_VIDEO_ABUSES_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_ABUSES) | |
9 | const SORTABLE_VIDEOS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEOS) | |
10 | const SORTABLE_VIDEO_COMMENT_THREADS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_COMMENT_THREADS) | |
11 | const SORTABLE_BLACKLISTS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.BLACKLISTS) | |
12 | const SORTABLE_VIDEO_CHANNELS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.VIDEO_CHANNELS) | |
13 | const SORTABLE_FOLLOWERS_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.FOLLOWERS) | |
14 | const SORTABLE_FOLLOWING_COLUMNS = createSortableColumns(SORTABLE_COLUMNS.FOLLOWING) | |
15 | ||
16 | const usersSortValidator = checkSort(SORTABLE_USERS_COLUMNS) | |
17 | const accountsSortValidator = checkSort(SORTABLE_ACCOUNTS_COLUMNS) | |
18 | const jobsSortValidator = checkSort(SORTABLE_JOBS_COLUMNS) | |
19 | const videoAbusesSortValidator = checkSort(SORTABLE_VIDEO_ABUSES_COLUMNS) | |
20 | const videosSortValidator = checkSort(SORTABLE_VIDEOS_COLUMNS) | |
21 | const videoCommentThreadsSortValidator = checkSort(SORTABLE_VIDEO_COMMENT_THREADS_COLUMNS) | |
22 | const blacklistSortValidator = checkSort(SORTABLE_BLACKLISTS_COLUMNS) | |
23 | const videoChannelsSortValidator = checkSort(SORTABLE_VIDEO_CHANNELS_COLUMNS) | |
24 | const followersSortValidator = checkSort(SORTABLE_FOLLOWERS_COLUMNS) | |
25 | const followingSortValidator = checkSort(SORTABLE_FOLLOWING_COLUMNS) | |
26 | ||
27 | // --------------------------------------------------------------------------- | |
28 | ||
29 | export { | |
30 | usersSortValidator, | |
31 | videoAbusesSortValidator, | |
32 | videoChannelsSortValidator, | |
33 | videosSortValidator, | |
34 | blacklistSortValidator, | |
35 | accountsSortValidator, | |
36 | followersSortValidator, | |
37 | followingSortValidator, | |
38 | jobsSortValidator, | |
39 | videoCommentThreadsSortValidator | |
40 | } |