feat: add ability to create/delete ugs from interface

This commit is contained in:
swve 2024-03-30 15:45:00 +00:00
parent 4f75e6a90a
commit d1d817678b
10 changed files with 317 additions and 25 deletions

View file

@ -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