feat(strava): add current user utility function

This commit is contained in:
Ali BARIN
2022-11-06 17:20:31 +01:00
parent 37c6b57a48
commit 8be2ed0034

View File

@@ -0,0 +1,10 @@
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
const getCurrentUser = async ($: IGlobalVariable): Promise<IJSONObject> => {
const response = await $.http.get('/v3/athlete');
const currentUser = response.data;
return currentUser;
};
export default getCurrentUser;