mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
14 lines
323 B
JavaScript
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();
|
|
}
|
|
|