Compare commits
2 commits
87c6a36823
...
bef78535c9
Author | SHA1 | Date | |
---|---|---|---|
bef78535c9 | |||
949907beb3 |
1 changed files with 5 additions and 4 deletions
|
@ -57,14 +57,15 @@ 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) {
|
||||
if (pinnedNoteIds.includes(note.id)) {
|
||||
continue;
|
||||
}
|
||||
if (pinnedNoteIds.includes(note.id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
await this.noteDeleteService.delete(user, note);
|
||||
await this.noteDeleteService.delete(user, note);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue