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

9 lines
292 B
JavaScript
Raw Normal View History

2022-09-07 07:32:06 +00:00
import { checkResponse, fetchWithTimeout } from './fetchUtil';
2022-10-13 07:03:10 +00:00
export async function getNodeAccounts(server, token) {
let accounts = await fetchWithTimeout(`https://${server}/admin/accounts?token=${token}`, { method: 'GET' });
2022-09-07 07:32:06 +00:00
checkResponse(accounts);
return await accounts.json();
}