feat: add assignment submission from the activity page

This commit is contained in:
swve 2024-07-20 20:10:43 +02:00
parent c13a7b4538
commit e9caa2ceb4
7 changed files with 207 additions and 29 deletions

View file

@ -187,3 +187,17 @@ export async function updateSubFile(
const res = await getResponseMetadata(result)
return res
}
// submissions
export async function submitAssignmentForGrading(
assignmentUUID: string,
access_token: string
) {
const result: any = await fetch(
`${getAPIUrl()}assignments/${assignmentUUID}/submissions`,
RequestBodyWithAuthHeader('POST', null, null, access_token)
)
const res = await getResponseMetadata(result)
return res
}