databag/net/web/src/api/getChannel.js

9 lines
290 B
JavaScript
Raw Normal View History

2022-04-14 21:13:08 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getChannel(token, channelId) {
let channel = await fetchWithTimeout(`/content/channels/${channelId}/detail?agent=${token}`, { method: 'GET' });
checkResponse(channel)
return await channel.json()
}