feat: scope invite code to UserGroups

This commit is contained in:
swve 2024-03-30 23:05:27 +00:00
parent e173a32e3c
commit ae677bc133
8 changed files with 212 additions and 54 deletions

View file

@ -10,6 +10,15 @@ export async function createInviteCode(org_id: any) {
return res
}
export async function createInviteCodeWithUserGroup(org_id: any, usergroup_id: number) {
const result = await fetch(
`${getAPIUrl()}orgs/${org_id}/invites_with_usergroups?usergroup_id=${usergroup_id}`,
RequestBody('POST', null, null)
)
const res = await getResponseMetadata(result)
return res
}
export async function deleteInviteCode(
org_id: any,
org_invite_code_uuid: string