mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
9 lines
287 B
JavaScript
9 lines
287 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function addCard(token, message) {
|
|
let card = await fetchWithTimeout(`/contact/cards?agent=${token}`, { method: 'POST', body: JSON.stringify(message)} );
|
|
checkResponse(card);
|
|
return await card.json();
|
|
}
|
|
|