mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: assignment publishing state switching
This commit is contained in:
parent
175a5a97fa
commit
ccf387cc98
5 changed files with 102 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue