fix: use equal

This commit is contained in:
Namekuji 2023-08-09 22:08:44 -04:00
parent 292c7651dc
commit 2be2ab9153
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -113,7 +113,7 @@ export const prepared = {
byUrl: `SELECT * FROM note WHERE "url" = ?`, byUrl: `SELECT * FROM note WHERE "url" = ?`,
byId: `SELECT * FROM note_by_id WHERE "id" IN ?`, byId: `SELECT * FROM note_by_id WHERE "id" IN ?`,
byUserId: `SELECT * FROM note_by_user_id WHERE "userId" 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" = ?`, delete: `DELETE FROM note WHERE "createdAtDate" = ? AND "createdAt" = ? AND "id" = ?`,
update: { update: {
@ -314,9 +314,8 @@ export async function execNotePaginationQuery(
const params: (Date | string | string[] | number)[] = []; const params: (Date | string | string[] | number)[] = [];
if (ps.noteId) { if (ps.noteId) {
params.push(ps.noteId); params.push(ps.noteId);
} else {
params.push(untilDate, untilDate);
} }
params.push(untilDate, untilDate);
if (sinceDate) { if (sinceDate) {
params.push(sinceDate); params.push(sinceDate);
} }