Commit f58def0d authored by nanahira's avatar nanahira

add participant seq

parent 8c220d79
Pipeline #36643 passed with stages
in 4 minutes and 28 seconds
......@@ -299,6 +299,8 @@ export class TournamentService extends CrudService(Tournament, {
.replace(/(\.ydk)+$/i, '');
participant.tournamentId = id;
participant.quit = false;
participant.seq = 1000;
participant.deckbuf = undefined;
participant['_invalid'] = reason;
participants.push(participant);
......@@ -338,6 +340,8 @@ export class TournamentService extends CrudService(Tournament, {
const text = file.content.toString('utf-8');
const participant = new Participant();
participant.quit = false;
participant.seq = 1000;
participant.name = file.path
.split('/')
.pop()
......
......@@ -7,6 +7,7 @@ export const multerToParticipant = (
) => {
const participant = new Participant();
participant.quit = false;
participant.seq = 1000;
participant.name = multerFile.originalname.replace(/(\.ydk)+$/i, '');
participant.tournamentId = tournamentId;
participant.deckbuf = Buffer.from(
......
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