mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 23:47:10 +00:00
fix answer submit
This commit is contained in:
@@ -20,11 +20,10 @@ export const submitTaskSolution = async (
|
|||||||
solution: string | File
|
solution: string | File
|
||||||
) => {
|
) => {
|
||||||
const endpoint = `/competitions/${competitionId}/tasks/${taskId}/submit`;
|
const endpoint = `/competitions/${competitionId}/tasks/${taskId}/submit`;
|
||||||
console.log("SUBMIT ", taskId, competitionId, solution)
|
|
||||||
if (typeof solution === 'string') {
|
if (typeof solution === 'string') {
|
||||||
return await userFetch(endpoint, {
|
return await userFetch(endpoint, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: { answer: solution }
|
body: { content: solution }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|||||||
Reference in New Issue
Block a user