databag/app/mobile/src/api/setChannelCard.js
2022-10-10 22:44:22 -07:00

8 lines
336 B
JavaScript

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