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

9 lines
287 B
JavaScript
Raw Normal View History

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