diff options
Diffstat (limited to 'server/models/utils.ts')
-rw-r--r-- | server/models/utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/utils.ts b/server/models/utils.ts index f89b80011..f7afb8d4b 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts | |||
@@ -67,7 +67,7 @@ function getVideoSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): Or | |||
67 | function getBlacklistSort (model: any, value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] { | 67 | function getBlacklistSort (model: any, value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] { |
68 | const [ firstSort ] = getSort(value) | 68 | const [ firstSort ] = getSort(value) |
69 | 69 | ||
70 | if (model) return [ [ literal(`"${model}.${firstSort[ 0 ]}" ${firstSort[ 1 ]}`) ], lastSort ] as any[] // FIXME: typings | 70 | if (model) return [ [ literal(`"${model}.${firstSort[0]}" ${firstSort[1]}`) ], lastSort ] as any[] // FIXME: typings |
71 | return [ firstSort, lastSort ] | 71 | return [ firstSort, lastSort ] |
72 | } | 72 | } |
73 | 73 | ||
@@ -139,7 +139,7 @@ function buildServerIdsFollowedBy (actorId: any) { | |||
139 | 'SELECT "actor"."serverId" FROM "actorFollow" ' + | 139 | 'SELECT "actor"."serverId" FROM "actorFollow" ' + |
140 | 'INNER JOIN "actor" ON actor.id = "actorFollow"."targetActorId" ' + | 140 | 'INNER JOIN "actor" ON actor.id = "actorFollow"."targetActorId" ' + |
141 | 'WHERE "actorFollow"."actorId" = ' + actorIdNumber + | 141 | 'WHERE "actorFollow"."actorId" = ' + actorIdNumber + |
142 | ')' | 142 | ')' |
143 | } | 143 | } |
144 | 144 | ||
145 | function buildWhereIdOrUUID (id: number | string) { | 145 | function buildWhereIdOrUUID (id: number | string) { |