mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: Improve the contributors admin UX/UI
This commit is contained in:
parent
77aec2cf92
commit
c0c32f9564
8 changed files with 899 additions and 50 deletions
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue