diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/constants.ts | 2 | ||||
-rw-r--r-- | server/models/utils.ts | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 5329d5fab..40f86a30d 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -39,7 +39,7 @@ const WEBSERVER = { | |||
39 | 39 | ||
40 | // Sortable columns per schema | 40 | // Sortable columns per schema |
41 | const SORTABLE_COLUMNS = { | 41 | const SORTABLE_COLUMNS = { |
42 | USERS: [ 'id', 'username', 'createdAt' ], | 42 | USERS: [ 'id', 'username', 'videoQuotaUsed', 'createdAt' ], |
43 | USER_SUBSCRIPTIONS: [ 'id', 'createdAt' ], | 43 | USER_SUBSCRIPTIONS: [ 'id', 'createdAt' ], |
44 | ACCOUNTS: [ 'createdAt' ], | 44 | ACCOUNTS: [ 'createdAt' ], |
45 | JOBS: [ 'createdAt' ], | 45 | JOBS: [ 'createdAt' ], |
diff --git a/server/models/utils.ts b/server/models/utils.ts index 206e108c3..30de91e1d 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts | |||
@@ -13,6 +13,8 @@ function getSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderIt | |||
13 | 13 | ||
14 | if (field.toLowerCase() === 'match') { // Search | 14 | if (field.toLowerCase() === 'match') { // Search |
15 | finalField = Sequelize.col('similarity') | 15 | finalField = Sequelize.col('similarity') |
16 | } else if (field === 'videoQuotaUsed') { // Users list | ||
17 | finalField = Sequelize.col('videoQuotaUsed') | ||
16 | } else { | 18 | } else { |
17 | finalField = field | 19 | finalField = field |
18 | } | 20 | } |