mirror of
https://github.com/balzack/databag.git
synced 2025-02-15 13:09:17 +00:00
10 lines
313 B
JavaScript
10 lines
313 B
JavaScript
|
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
||
|
|
||
|
export async function getCard(server, token, cardId) {
|
||
|
let param = "?agent=" + token
|
||
|
let card = await fetchWithTimeout(`https://${server}/contact/cards/${cardId}${param}`, { method: 'GET' });
|
||
|
checkResponse(card);
|
||
|
return await card.json()
|
||
|
}
|
||
|
|