mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 21:09:17 -06:00
Sort on videoQuotaUsed in backend
This commit is contained in:
parent
41b15c8921
commit
aa3796bda5
@ -39,7 +39,7 @@ const WEBSERVER = {
|
||||
|
||||
// Sortable columns per schema
|
||||
const SORTABLE_COLUMNS = {
|
||||
USERS: [ 'id', 'username', 'createdAt' ],
|
||||
USERS: [ 'id', 'username', 'videoQuotaUsed', 'createdAt' ],
|
||||
USER_SUBSCRIPTIONS: [ 'id', 'createdAt' ],
|
||||
ACCOUNTS: [ 'createdAt' ],
|
||||
JOBS: [ 'createdAt' ],
|
||||
|
@ -13,6 +13,8 @@ function getSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderIt
|
||||
|
||||
if (field.toLowerCase() === 'match') { // Search
|
||||
finalField = Sequelize.col('similarity')
|
||||
} else if (field === 'videoQuotaUsed') { // Users list
|
||||
finalField = Sequelize.col('videoQuotaUsed')
|
||||
} else {
|
||||
finalField = field
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user