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

8 lines
338 B
JavaScript
Raw Normal View History

2022-11-14 21:30:58 +00:00
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)
}