databag/app/mobile/api/getCardCloseMessage.js
2022-09-07 00:32:06 -07:00

9 lines
298 B
JavaScript

import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getCardCloseMessage(token, cardId) {
let message = await fetchWithTimeout(`/contact/cards/${cardId}/closeMessage?agent=${token}`, { method: 'GET' });
checkResponse(message);
return await message.json();
}