databag/app/mobile/src/api/getCardDetail.js

10 lines
332 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
2022-09-15 18:26:03 +00:00
export async function getCardDetail(server, token, cardId) {
2022-09-07 07:32:06 +00:00
let param = "?agent=" + token
2022-09-15 18:26:03 +00:00
let detail = await fetchWithTimeout(`https://${server}/contact/cards/${cardId}/detail${param}`, { method: 'GET' });
2022-09-07 07:32:06 +00:00
checkResponse(detail);
return await detail.json()
}