Commit a10d16dc authored by nanahira's avatar nanahira

fix

parent d4adb53d
......@@ -397,6 +397,7 @@ export class TournamentService extends CrudService(Tournament, {
updates: { id: T; seq: number }[],
) {
if (updates.length) {
if (updates.length > 1) {
await this.repo.manager
.createQueryBuilder()
.update(Participant)
......@@ -409,6 +410,11 @@ export class TournamentService extends CrudService(Tournament, {
})
.whereInIds(updates.map((p) => p.id))
.execute();
} else {
await this.repo.manager.update(Participant, updates[0].id, {
seq: updates[0].seq,
});
}
}
return new GenericReturnMessageDto(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment