mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
13 lines
386 B
JavaScript
13 lines
386 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function getContactChannelDetail(server, token, channelId) {
|
|
let host = "";
|
|
if (server) {
|
|
host = `https://${server}`;
|
|
}
|
|
let detail = await fetchWithTimeout(`${host}/content/channels/${channelId}/detail?contact=${token}`, { method: 'GET' });
|
|
checkResponse(detail)
|
|
return await detail.json()
|
|
}
|
|
|