mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add delete activity option + redesign edit
This commit is contained in:
parent
8f5dcac35e
commit
142e111c15
7 changed files with 111 additions and 43 deletions
|
|
@ -52,6 +52,12 @@ export async function getActivity(activity_id: any, next: any) {
|
|||
return res;
|
||||
}
|
||||
|
||||
export async function deleteActivity(activity_id: any) {
|
||||
const result = await fetch(`${getAPIUrl()}activities/${activity_id}`, RequestBody("DELETE", null, null));
|
||||
const res = await result.json();
|
||||
return res;
|
||||
}
|
||||
|
||||
export async function getActivityWithAuthHeader(activity_id: any, next: any, access_token: string) {
|
||||
const result = await fetch(`${getAPIUrl()}activities/activity_${activity_id}`, RequestBodyWithAuthHeader("GET", null, next, access_token));
|
||||
const res = await result.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue