mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 12:07:10 +00:00
continued working on session fetch
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
import { userFetch } from ".";
|
||||
import { Task } from "../types/task";
|
||||
import { Task, Solution, TaskAttachment } from "../types/task";
|
||||
|
||||
export const getCompetitionTasks = async (competitionId: string) => {
|
||||
return await userFetch<Task[]>(`/competitions/${competitionId}/tasks`);
|
||||
};
|
||||
|
||||
export const getTaskSolutionHistory = async (competitionId: string, taskId: string) => {
|
||||
return await userFetch<Solution[]>(`/competitions/${competitionId}/tasks/${taskId}/history`);
|
||||
};
|
||||
|
||||
export const getTaskAttachments = async (competitionId: string, taskId: string) => {
|
||||
return await userFetch<TaskAttachment[]>(`/competitions/${competitionId}/tasks/${taskId}/attachments`);
|
||||
};
|
||||
|
||||
|
||||
export const submitTaskSolution = async (
|
||||
competitionId: string,
|
||||
taskId: string,
|
||||
|
||||
Reference in New Issue
Block a user