enhance(backend): some tweaks

This commit is contained in:
syuilo 2023-10-06 16:17:29 +09:00
parent 132b01461d
commit 87416710c3
4 changed files with 3 additions and 24 deletions

View file

@ -64,11 +64,6 @@ export class NoteDeleteService {
const deletedAt = new Date();
const cascadingNotes = await this.findCascadingNotes(note);
// この投稿を除く指定したユーザーによる指定したノートのリノートが存在しないとき
if (note.renoteId && (await this.noteEntityService.countSameRenotes(user.id, note.renoteId, note.id)) === 0) {
this.notesRepository.decrement({ id: note.renoteId }, 'renoteCount', 1);
}
if (note.replyId) {
await this.notesRepository.decrement({ id: note.replyId }, 'repliesCount', 1);
}