mirror of
https://github.com/balzack/databag.git
synced 2025-02-15 21:19:16 +00:00
14 lines
368 B
JavaScript
14 lines
368 B
JavaScript
|
import { checkResponse, fetchWithTimeout } from './fetchUtil';
|
||
|
|
||
|
export async function getContactProfile(server, guid, token) {
|
||
|
let host = "";
|
||
|
if (server) {
|
||
|
host = `https://${server}`;
|
||
|
}
|
||
|
|
||
|
let profile = await fetchWithTimeout(`${host}/profile/message?contact=${guid}.${token}`, { method: 'GET', });
|
||
|
checkResponse(profile);
|
||
|
return await profile.json()
|
||
|
}
|
||
|
|