mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 19:49:16 +00:00
14 lines
374 B
JavaScript
14 lines
374 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function setCardCloseMessage(server, message) {
|
|
let host = "";
|
|
if (server) {
|
|
host = `https://${server}`;
|
|
}
|
|
|
|
let status = await fetchWithTimeout(`${host}/contact/closeMessage`, { method: 'PUT', body: JSON.stringify(message) });
|
|
checkResponse(status);
|
|
return await status.json();
|
|
}
|
|
|