From 2be2ab91538153e1f622901481bf0a77463bd24e Mon Sep 17 00:00:00 2001 From: Namekuji Date: Wed, 9 Aug 2023 22:08:44 -0400 Subject: [PATCH] fix: use equal --- packages/backend/src/db/scylla.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/db/scylla.ts b/packages/backend/src/db/scylla.ts index d168a4ceb9..65ee4fb7f2 100644 --- a/packages/backend/src/db/scylla.ts +++ b/packages/backend/src/db/scylla.ts @@ -113,7 +113,7 @@ export const prepared = { byUrl: `SELECT * FROM note WHERE "url" = ?`, byId: `SELECT * FROM note_by_id WHERE "id" IN ?`, byUserId: `SELECT * FROM note_by_user_id WHERE "userId" IN ?`, - byRenoteId: `SELECT * FROM note_by_renote_id WHERE "renoteId" IN ?`, + byRenoteId: `SELECT * FROM note_by_renote_id WHERE "renoteId" = ?`, }, delete: `DELETE FROM note WHERE "createdAtDate" = ? AND "createdAt" = ? AND "id" = ?`, update: { @@ -314,9 +314,8 @@ export async function execNotePaginationQuery( const params: (Date | string | string[] | number)[] = []; if (ps.noteId) { params.push(ps.noteId); - } else { - params.push(untilDate, untilDate); } + params.push(untilDate, untilDate); if (sinceDate) { params.push(sinceDate); }