databag/app/mobile/api/getListing.js
2022-09-07 00:32:06 -07:00

14 lines
323 B
JavaScript

import { checkResponse, fetchWithTimeout } from './fetchUtil';
export async function getListing(server) {
let host = "";
if (server) {
host = `https://${server}`;
}
let listing = await fetchWithTimeout(`${host}/account/listing`, { method: 'GET' });
checkResponse(listing);
return await listing.json();
}