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