Compare commits
No commits in common. "bef78535c940a2e9ed2d9f7dfac39fc4a956c9e4" and "87c6a36823c0c9405431a9945931284523eab793" have entirely different histories.
bef78535c9
...
87c6a36823
1 changed files with 4 additions and 5 deletions
|
@ -57,15 +57,14 @@ export class AutoDeleteNotesProcessorService {
|
||||||
const notes = await this.notesRepository.createQueryBuilder('note')
|
const notes = await this.notesRepository.createQueryBuilder('note')
|
||||||
.where('note."userId" = :userId', { userId: user.user.id })
|
.where('note."userId" = :userId', { userId: user.user.id })
|
||||||
.andWhere('note.id < :untilId', { untilId })
|
.andWhere('note.id < :untilId', { untilId })
|
||||||
.andWhere('note.id NOT IN (SELECT "noteId" FROM note_favorite WHERE "userId" = :userId)');
|
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
for (const note of notes) {
|
for (const note of notes) {
|
||||||
if (pinnedNoteIds.includes(note.id)) {
|
if (pinnedNoteIds.includes(note.id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.noteDeleteService.delete(user, note);
|
await this.noteDeleteService.delete(user, note);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue