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

9 lines
314 B
JavaScript
Raw Normal View History

2022-04-05 23:52:39 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function setCardCloseMessage(server, message) {
let status = await fetchWithTimeout(`https://${server}/contact/closeMessage`, { method: 'PUT', body: JSON.stringify(message) });
checkResponse(status);
return await status.json();
}