databag/app/mobile/src/api/setChannelCard.js

8 lines
311 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function setChannelCard(token, channelId, cardId ) {
let channel = await fetchWithTimeout(`/content/channels/${channelId}/cards/${cardId}?agent=${token}`, {method: 'PUT'});
checkResponse(channel);
return await channel.json();
}