Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
chore: noteの重複チェックを復活
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Sep 30, 2023
1 parent 7a861d8 commit 6943c69
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/migration/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ export async function migrateNote(noteId: string, useNote?: Note) {
}


// const checkExists = await noteRepository.findOne(note.id); // 既にノートが移行済みか確認
// if (checkExists) return; // 移行済みならスキップする


if (note.replyId) await checkReply(note.replyId); // リプライが既に登録されてるか確認し、無いなら再帰的に作成する
if (note.renoteId) await checkRenoteId(note.renoteId); // renoteが既に登録されてるか確認し、無いなら再帰的に作成する

const checkExists = await noteRepository.findOne(note.id); // 既にノートが移行済みか確認
if (checkExists) return; // 移行済みならスキップする

await save(note);
}

Expand Down

0 comments on commit 6943c69

Please sign in to comment.