mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
added missing file
This commit is contained in:
parent
43bf6d0d04
commit
38e7acf5ea
9
app/mobile/src/api/getCard.js
Normal file
9
app/mobile/src/api/getCard.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
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()
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user