mirror of
https://github.com/balzack/databag.git
synced 2025-02-16 05:29:15 +00:00
10 lines
330 B
JavaScript
10 lines
330 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function getListing(server, filter) {
|
|
const param = filter ? `?filter=${filter}` : '';
|
|
let listing = await fetchWithTimeout(`https://${server}/account/listing${param}`, { method: 'GET' });
|
|
checkResponse(listing);
|
|
return await listing.json();
|
|
}
|
|
|