From bef78535c940a2e9ed2d9f7dfac39fc4a956c9e4 Mon Sep 17 00:00:00 2001 From: jaina heartles Date: Tue, 12 Mar 2024 18:21:15 -0700 Subject: [PATCH] saving work --- .../src/queue/processors/AutoDeleteNotesProcessorService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/queue/processors/AutoDeleteNotesProcessorService.ts b/packages/backend/src/queue/processors/AutoDeleteNotesProcessorService.ts index 24a3fba1a0..b44676e665 100644 --- a/packages/backend/src/queue/processors/AutoDeleteNotesProcessorService.ts +++ b/packages/backend/src/queue/processors/AutoDeleteNotesProcessorService.ts @@ -57,6 +57,7 @@ export class AutoDeleteNotesProcessorService { const notes = await this.notesRepository.createQueryBuilder('note') .where('note."userId" = :userId', { userId: user.user.id }) .andWhere('note.id < :untilId', { untilId }) + .andWhere('note.id NOT IN (SELECT "noteId" FROM note_favorite WHERE "userId" = :userId)'); .getMany(); for (const note of notes) {