Skip to content

Commit

Permalink
doggo AI
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin2Shih committed Apr 28, 2024
1 parent 59f424f commit a546b85
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/(api)/_actions/submissions/updateSubmission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ export default async function updateSubmission(
const { judge_id, team_id, comments, ...rest } = FormToJSON(formData);
const keys = Object.keys(rest);
const scores = keys.slice(0, 5).map((key: string) => +rest[key]);
const correlations = keys
.slice(5)
.map((key: string) => ({ track: key, score: +rest[key] }));
const correlations = keys.slice(5).map((key: string) => ({
track: Buffer.from(key, 'ascii').toString('utf-8'),
score: +rest[key],
}));

const updateBody = {
$set: {
Expand Down

0 comments on commit a546b85

Please sign in to comment.