aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/utils.ts')
-rw-r--r--server/models/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/utils.ts b/server/models/utils.ts
index 83b2b8f03..6a109056f 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -74,8 +74,8 @@ function getVideoSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): Or
74 finalField = field 74 finalField = field
75 } 75 }
76 76
77 const firstSort = typeof finalField === 'string' 77 const firstSort: OrderItem = typeof finalField === 'string'
78 ? finalField.split('.').concat([ direction ]) as any // FIXME: sequelize typings 78 ? finalField.split('.').concat([ direction ]) as OrderItem
79 : [ finalField, direction ] 79 : [ finalField, direction ]
80 80
81 return [ firstSort, lastSort ] 81 return [ firstSort, lastSort ]
@@ -84,7 +84,7 @@ function getVideoSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): Or
84function getBlacklistSort (model: any, value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] { 84function getBlacklistSort (model: any, value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] {
85 const [ firstSort ] = getSort(value) 85 const [ firstSort ] = getSort(value)
86 86
87 if (model) return [ [ literal(`"${model}.${firstSort[0]}" ${firstSort[1]}`) ], lastSort ] as any[] // FIXME: typings 87 if (model) return [ [ literal(`"${model}.${firstSort[0]}" ${firstSort[1]}`) ], lastSort ] as OrderItem[]
88 return [ firstSort, lastSort ] 88 return [ firstSort, lastSort ]
89} 89}
90 90