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

8 lines
336 B
JavaScript
Raw Normal View History

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