databag/app/mobile/api/getContactChannelDetail.js
2022-09-07 00:32:06 -07:00

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()
}