mirror of
https://github.com/balzack/databag.git
synced 2025-02-13 03:59:16 +00:00
9 lines
297 B
JavaScript
9 lines
297 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function setProfileImage(token, image) {
|
|
let profile = await fetchWithTimeout(`/profile/image?agent=${token}`, { method: 'PUT', body: JSON.stringify(image) });
|
|
checkResponse(profile)
|
|
return await profile.json()
|
|
}
|
|
|