Skip to content

Commit

Permalink
Doing it the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
palmertab committed Nov 14, 2024
1 parent 1e893d3 commit b1e6b4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/controllers/tab/round/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {};
Expand Down Expand Up @@ -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;
}
});
Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b1e6b4f

Please sign in to comment.