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

9 lines
293 B
JavaScript

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