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

9 lines
291 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
2022-09-29 18:31:55 +00:00
export async function removeChannel(server, token, channelId) {
2022-09-07 07:32:06 +00:00
2022-09-29 18:31:55 +00:00
let channel = await fetchWithTimeout(`https://${server}/content/channels/${channelId}?agent=${token}`,
2022-09-07 07:32:06 +00:00
{ method: 'DELETE' });
checkResponse(channel);
}