mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 19:49:16 +00:00
14 lines
354 B
JavaScript
14 lines
354 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function getGroups(token, revision) {
|
|
let param = "agent=" + token
|
|
if (revision != null) {
|
|
param += '&revision=' + revision
|
|
}
|
|
let groups = await fetchWithTimeout(`/alias/groups?${param}`, { method: 'GET' });
|
|
checkResponse(groups)
|
|
return await groups.json()
|
|
}
|
|
|
|
|