mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
13 lines
389 B
JavaScript
13 lines
389 B
JavaScript
|
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
||
|
|
||
|
export async function removeContactChannelTopic(server, token, channelId, topicId) {
|
||
|
let host = "";
|
||
|
if (server) {
|
||
|
host = `https://${server}`;
|
||
|
}
|
||
|
|
||
|
let channel = await fetchWithTimeout(`${host}/content/channels/${channelId}/topics/${topicId}?contact=${token}`,
|
||
|
{ method: 'DELETE' });
|
||
|
checkResponse(channel);
|
||
|
}
|