mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
15 lines
415 B
JavaScript
15 lines
415 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function getContactChannelTopic(server, token, channelId, topicId) {
|
|
let host = "";
|
|
if (server) {
|
|
host = `https://${server}`;
|
|
}
|
|
|
|
let topic = await fetchWithTimeout(`${host}/content/channels/${channelId}/topics/${topicId}/detail?contact=${token}`,
|
|
{ method: 'GET' });
|
|
checkResponse(topic)
|
|
return await topic.json()
|
|
}
|
|
|