databag/net/web/src/api/removeContactChannelTopic.js

13 lines
389 B
JavaScript
Raw Normal View History

2022-05-26 22:19:58 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function removeContactChannelTopic(server, token, channelId, topicId) {
2022-07-29 21:23:02 +00:00
let host = "";
if (server) {
host = `https://${server}`;
}
let channel = await fetchWithTimeout(`${host}/content/channels/${channelId}/topics/${topicId}?contact=${token}`,
2022-05-26 22:19:58 +00:00
{ method: 'DELETE' });
checkResponse(channel);
}