fix: use explicit match id in temporary match seed
This commit is contained in:
1 parent
6efbd50db7
commit
fbf22284e8
1 file changed
+4
-3
@@ -250,9 +250,10 @@ async function main() {
|
||||
);
|
||||
}
|
||||
|
||||
const match = await MatchModel.create(payload);
|
||||
console.log(`[temp result seed] created=${match._id.toString()}`);
|
||||
console.log(`[temp result seed] route=/match/${match._id.toString()}`);
|
||||
const matchId = new mongoose.Types.ObjectId();
|
||||
await MatchModel.create({ ...payload, _id: matchId });
|
||||
console.log(`[temp result seed] created=${matchId.toString()}`);
|
||||
console.log(`[temp result seed] route=/match/${matchId.toString()}`);
|
||||
} finally {
|
||||
await app.close();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user