feat: Improve the contributors admin UX/UI

This commit is contained in:
swve 2025-06-08 11:52:36 +02:00
parent 77aec2cf92
commit c0c32f9564
8 changed files with 899 additions and 50 deletions

View file

@ -153,3 +153,21 @@ export async function applyForContributor(course_uuid: string, data: any, access
const res = await getResponseMetadata(result)
return res
}
export async function bulkAddContributors(course_uuid: string, data: any, access_token:string | null | undefined) {
const result: any = await fetch(
`${getAPIUrl()}courses/${course_uuid}/bulk-add-contributors`,
RequestBodyWithAuthHeader('POST', data, null,access_token || undefined)
)
const res = await getResponseMetadata(result)
return res
}
export async function bulkRemoveContributors(course_uuid: string, data: any, access_token:string | null | undefined) {
const result: any = await fetch(
`${getAPIUrl()}courses/${course_uuid}/bulk-remove-contributors`,
RequestBodyWithAuthHeader('PUT', data, null,access_token || undefined)
)
const res = await getResponseMetadata(result)
return res
}