mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
10 lines
251 B
JavaScript
10 lines
251 B
JavaScript
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()
|
|
}
|
|
|
|
|