databag/app/mobile/api/getProfile.js

10 lines
251 B
JavaScript
Raw Normal View History

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