mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 20:17:10 +00:00
Merge branch 'master' of gitlab.prodcontest.ru:team-15/project
This commit is contained in:
@@ -155,5 +155,5 @@ def get_submissions_history(request, competition_id: UUID, task_id: UUID):
|
||||
def get_task_attachments(request, competition_id: UUID, task_id: UUID):
|
||||
task = get_object_or_404(CompetitionTask, id=task_id)
|
||||
return status.OK, CompetitionTaskAttachment.objects.filter(
|
||||
competition_id=competition_id, task=task, user=request.auth
|
||||
)
|
||||
task=task, user=request.auth
|
||||
).all()
|
||||
|
||||
@@ -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