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

9 lines
270 B
JavaScript
Raw Normal View History

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