databag/app/mobile/api/getNodeAccounts.js

9 lines
267 B
JavaScript
Raw Normal View History

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