mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
10 lines
391 B
JavaScript
10 lines
391 B
JavaScript
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
|
|
|
export async function setProfileData(token, name, location, description) {
|
|
let data = { name: name, location: location, description: description };
|
|
let profile = await fetchWithTimeout(`/profile/data?agent=${token}`, { method: 'PUT', body: JSON.stringify(data) });
|
|
checkResponse(profile)
|
|
return await profile.json()
|
|
}
|
|
|