feat: assignment publishing state switching

This commit is contained in:
swve 2024-07-18 00:15:42 +02:00
parent 175a5a97fa
commit ccf387cc98
5 changed files with 102 additions and 32 deletions

View file

@ -14,6 +14,19 @@ export async function createAssignment(body: any, access_token: string) {
return res
}
export async function updateAssignment(
body: any,
assignmentUUID: string,
access_token: string
) {
const result: any = await fetch(
`${getAPIUrl()}assignments/${assignmentUUID}`,
RequestBodyWithAuthHeader('PUT', body, null, access_token)
)
const res = await getResponseMetadata(result)
return res
}
export async function getAssignmentFromActivityUUID(
activityUUID: string,
access_token: string