mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 11:39:17 +00:00
13 lines
350 B
JavaScript
13 lines
350 B
JavaScript
|
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
||
|
|
||
|
export async function getCards(token, revision) {
|
||
|
let param = "agent=" + token
|
||
|
if (revision != null) {
|
||
|
param += '&revision=' + revision
|
||
|
}
|
||
|
let cards = await fetchWithTimeout(`/contact/cards?${param}`, { method: 'GET' });
|
||
|
checkResponse(cards)
|
||
|
return await cards.json()
|
||
|
}
|
||
|
|