feat: add a way to for user to update a usergroups name,description

This commit is contained in:
Chris Holland 2024-10-23 07:20:53 -07:00
parent 19cc3ea0d7
commit 4b87072a5b
No known key found for this signature in database
GPG key ID: 68B0A864B1B0A0D2
3 changed files with 139 additions and 4 deletions

View file

@ -48,6 +48,19 @@ export async function unLinkUserToUserGroup(
return res
}
export async function updateUserGroup(
usergroup_id: number,
access_token: string,
data: any
) {
const result: any = await fetch(
`${getAPIUrl()}usergroups/${usergroup_id}`,
RequestBodyWithAuthHeader('PUT', data, null, access_token)
)
const res = await getResponseMetadata(result)
return res
}
export async function deleteUserGroup(
usergroup_id: number,
access_token: string