mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement activity removal from trail and update UI for unmarking activities
This commit is contained in:
parent
b25505465b
commit
1350cb7354
4 changed files with 150 additions and 6 deletions
|
|
@ -36,3 +36,17 @@ export async function markActivityAsComplete(
|
|||
const res = await errorHandling(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function unmarkActivityAsComplete(
|
||||
org_slug: string,
|
||||
course_uuid: string,
|
||||
activity_uuid: string,
|
||||
access_token: any
|
||||
) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}trail/remove_activity/${activity_uuid}`,
|
||||
RequestBodyWithAuthHeader('DELETE', null, null, access_token)
|
||||
)
|
||||
const res = await errorHandling(result)
|
||||
return res
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue