diff --git a/api/controllers/tab/round/index.js b/api/controllers/tab/round/index.js index 793d026..6086414 100644 --- a/api/controllers/tab/round/index.js +++ b/api/controllers/tab/round/index.js @@ -217,15 +217,15 @@ export const roundDecisionStatus = { round.judges[ballot.judge] = {}; } - if (!round.judges[ballot.judge][ballot.flight]) { - round.judges[ballot.judge][ballot.flight] = { panel: ballot.panel }; + if (!round.judges[ballot.judge][ballot.panel]) { + round.judges[ballot.judge][ballot.panel] = { panel: ballot.panel }; } if (!round.panels[ballot.panel]) { round.panels[ballot.panel] = 0; } - const judge = round.judges[ballot.judge][ballot.flight]; + const judge = round.judges[ballot.judge][ballot.panel]; if (!round.out[ballot.flight]) { round.out[ballot.flight] = {}; @@ -290,7 +290,7 @@ export const roundDecisionStatus = { judge.text = `${started.getUTCHours()}:${addZero(started.getUTCMinutes())}`; } else { round.out[ballot.flight][ballot.judge] = true; - delete round.judges[ballot.judge][ballot.flight]; + delete round.judges[ballot.judge][ballot.panel]; round.panels[ballot.panel] += 1; } }); diff --git a/app.js b/app.js index 3fa5c22..f13ac0c 100644 --- a/app.js +++ b/app.js @@ -96,7 +96,7 @@ app.use('/v1/public/search', searchLimiter); // Enable CORS Access, hopefully in a way that means I don't // have to fight with it ever again. const corsOptions = { - methods : ['GET', 'POST', 'DELETE'], + methods : ['GET', 'POST', 'DELETE', 'PUT'], optionsSuccessStatus : 204, credentials : true, origin : config.CORS_ORIGINS,