databag/app/mobile/src/api/setChannelNotifications.js
2022-11-14 13:30:58 -08:00

8 lines
338 B
JavaScript

import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function setChannelNotifications(server, token, channelId, flag) {
const notify = await fetchWithTimeout(`https://${server}/content/channels/${channelId}/notification?agent=${token}`, { method: 'PUT', body: JSON.stringify(flag) });
checkResponse(notify)
}