databag/app/mobile/src/api/getChannelDetail.js
2022-09-15 01:03:20 -07:00

9 lines
318 B
JavaScript

import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getChannelDetail(server, token, channelId) {
let detail = await fetchWithTimeout(`https://${server}/content/channels/${channelId}/detail?agent=${token}`, { method: 'GET' });
checkResponse(detail)
return await detail.json()
}