diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-25 11:15:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-25 11:15:03 +0200 |
commit | aa3796bda5a6776e0d21048239f25d385a8e7545 (patch) | |
tree | 68f48c085c225d7969ff4f5a75d3f916e50452fb /server/models | |
parent | 41b15c892192073828458d007256a9dfdf3bb6fb (diff) | |
download | PeerTube-aa3796bda5a6776e0d21048239f25d385a8e7545.tar.gz PeerTube-aa3796bda5a6776e0d21048239f25d385a8e7545.tar.zst PeerTube-aa3796bda5a6776e0d21048239f25d385a8e7545.zip |
Sort on videoQuotaUsed in backend
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/utils.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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 | } |