diff --git a/client/src/pages/presentationEditor/components/answerComponents/AnswerMultiple.tsx b/client/src/pages/presentationEditor/components/answerComponents/AnswerMultiple.tsx index d95c735507090f3d88a518f26bb216f506b9f661..ac59cc7fd7b2e61b29915b956386c2586fd49b91 100644 --- a/client/src/pages/presentationEditor/components/answerComponents/AnswerMultiple.tsx +++ b/client/src/pages/presentationEditor/components/answerComponents/AnswerMultiple.tsx @@ -53,7 +53,7 @@ const AnswerMultiple = ({ variant, activeSlide, competitionId }: AnswerMultipleP } const url = `/api/competitions/${competitionId}/teams/${teamId}/answers/${alternative.id}` const payload = { - answer: checked ? 1 : 0, + answer: checked ? '1' : '0', } await axios .put(url, payload) diff --git a/client/src/pages/presentationEditor/components/answerComponents/AnswerSingle.tsx b/client/src/pages/presentationEditor/components/answerComponents/AnswerSingle.tsx index 901e37c3de26930bff64d802ba685f46dfbaf112..13c40a299672c127cab16bc32d9da7faf14c4618 100644 --- a/client/src/pages/presentationEditor/components/answerComponents/AnswerSingle.tsx +++ b/client/src/pages/presentationEditor/components/answerComponents/AnswerSingle.tsx @@ -58,12 +58,12 @@ const AnswerSingle = ({ variant, activeSlide, competitionId }: AnswerSingleProps const alternatives = activeSlide.questions[0].alternatives for (const alt of alternatives) { const url = `/api/competitions/${competitionId}/teams/${teamId}/answers/${alt.id}` - await axios.put(url, { answer: 0 }) + await axios.put(url, { answer: '0' }) } // Update selected alternative const url = `/api/competitions/${competitionId}/teams/${teamId}/answers/${alternative.id}` await axios - .put(url, { answer: 1 }) + .put(url, { answer: '1' }) .then(() => { if (variant === 'editor') { dispatch(getEditorCompetition(competitionId))