]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Optimize rate endpoint
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index 143c1a23c13508627e1b1f1a9ee3e0ac935a8501..5337ae75dc38f924b3a89974e9b28c930a735eb4 100644 (file)
@@ -134,7 +134,7 @@ function buildBlockedAccountSQL (blockerIds: number[]) {
   const blockerIdsString = blockerIds.join(', ')
 
   return 'SELECT "targetAccountId" AS "id" FROM "accountBlocklist" WHERE "accountId" IN (' + blockerIdsString + ')' +
-    ' UNION ALL ' +
+    ' UNION ' +
     '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 + ')'