feat: implement usage limits across the app

This commit is contained in:
swve 2024-08-11 21:08:18 +02:00
parent 85ffb44d93
commit a5fbf49304
15 changed files with 281 additions and 160 deletions

View file

@ -99,9 +99,9 @@ export async function getActivityByID(
return res
}
export async function deleteActivity(activity_id: any, access_token: string) {
export async function deleteActivity(activity_uuid: any, access_token: string) {
const result = await fetch(
`${getAPIUrl()}activities/${activity_id}`,
`${getAPIUrl()}activities/${activity_uuid}`,
RequestBodyWithAuthHeader('DELETE', null, null, access_token)
)
const res = await result.json()

View file

@ -98,7 +98,7 @@ export async function createNewCourse(
`${getAPIUrl()}courses/?org_id=${org_id}`,
RequestBodyFormWithAuthHeader('POST', formData, null, access_token)
)
const res = await errorHandling(result)
const res = await getResponseMetadata(result)
return res
}