mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add ability to create/delete ugs from interface
This commit is contained in:
parent
4f75e6a90a
commit
d1d817678b
10 changed files with 317 additions and 25 deletions
|
|
@ -10,6 +10,24 @@ export async function getUserGroups(org_id: any) {
|
|||
return res
|
||||
}
|
||||
|
||||
export async function createUserGroup(body: any) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}usergroups`,
|
||||
RequestBody('POST', body, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function deleteUserGroup(usergroup_id: number) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}usergroups/${usergroup_id}`,
|
||||
RequestBody('DELETE', null, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function linkResourcesToUserGroup(
|
||||
usergroup_id: any,
|
||||
resource_uuids: any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue