@chayns-components/person-finder
Version:
A set of beautiful React components for developing your own applications with chayns.
22 lines • 553 B
JavaScript
import { getAccessToken } from 'chayns-api';
const URL = 'https://webapi.tobit.com/AccountService/v1.0/chayns/friends';
export const getFriends = async () => {
const {
accessToken
} = await getAccessToken();
if (!accessToken) {
return undefined;
}
const requestInit = {
headers: {
Authorization: `Bearer ${accessToken}`
},
method: 'GET'
};
const response = await fetch(URL, requestInit);
if (response.status === 200) {
return await response.json();
}
return undefined;
};
//# sourceMappingURL=get.js.map