]
}
- return [ [ field, direction ], lastSort ]
+ const firstSort = typeof field === 'string' ?
+ field.split('.').concat([ direction ]) :
+ [ field, direction ]
+
+ return [ firstSort, lastSort ]
}
function getSortOnModel (model: any, value: string, lastSort: string[] = [ 'id', 'ASC' ]) {
const query = 'SELECT "targetAccountId" AS "id" FROM "accountBlocklist" WHERE "accountId" IN (' + blockerIdsString + ')' +
' UNION ALL ' +
- // 'SELECT "accountId" FROM "accountBlocklist" WHERE "targetAccountId" = user.account.id
- // UNION ALL
'SELECT "account"."id" AS "id" FROM account INNER JOIN "actor" ON account."actorId" = actor.id ' +
'INNER JOIN "serverBlocklist" ON "actor"."serverId" = "serverBlocklist"."targetServerId" ' +
'WHERE "serverBlocklist"."accountId" IN (' + blockerIdsString + ')'