databag/net/web/src/api/getCardDetail.js

10 lines
307 B
JavaScript
Raw Normal View History

2022-04-24 07:27:28 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getCardDetail(token, cardId) {
let param = "?agent=" + token
let detail = await fetchWithTimeout(`/contact/cards/${cardId}/detail${param}`, { method: 'GET' });
checkResponse(detail);
return await detail.json()
}