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

9 lines
323 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
2022-09-26 19:14:06 +00:00
export async function getCardCloseMessage(server, token, cardId) {
let message = await fetchWithTimeout(`https://${server}/contact/cards/${cardId}/closeMessage?agent=${token}`, { method: 'GET' });
2022-09-07 07:32:06 +00:00
checkResponse(message);
return await message.json();
}