databag/app/mobile/api/getListingMessage.js

14 lines
352 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getListingMessage(server, guid) {
let host = "";
if (server) {
host = `https://${server}`;
}
let listing = await fetchWithTimeout(`${host}/account/listing/${guid}/message`, { method: 'GET' });
checkResponse(listing);
return await listing.json();
}