From f58da275ebd7a81af6c11dc48a92af60617c98cc Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 4 Aug 2023 14:36:08 -0400 Subject: [PATCH] Fix group by not working on postgres --- src/routes/postBranding.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/postBranding.ts b/src/routes/postBranding.ts index ddd9f11..06572c8 100644 --- a/src/routes/postBranding.ts +++ b/src/routes/postBranding.ts @@ -176,7 +176,7 @@ async function getVerificationValue(hashedUserID: HashedUserID, isVip: boolean): async function verifyOldSubmissions(hashedUserID: HashedUserID, verification: number): Promise { if (verification >= 0) { - const unverifiedSubmissions = await db.prepare("all", `SELECT "videoID", "hashedVideoID", "service" FROM "titles" JOIN "titleVotes" ON "titles"."UUID" = "titleVotes"."UUID" WHERE "titles"."userID" = ? AND "titleVotes"."verification" < ? GROUP BY "videoID"`, [hashedUserID, verification]); + const unverifiedSubmissions = await db.prepare("all", `SELECT "videoID", "hashedVideoID", "service" FROM "titles" JOIN "titleVotes" ON "titles"."UUID" = "titleVotes"."UUID" WHERE "titles"."userID" = ? AND "titleVotes"."verification" < ? GROUP BY "videoID", "hashedVideoID", "service"`, [hashedUserID, verification]); if (unverifiedSubmissions.length > 0) { for (const submission of unverifiedSubmissions) {