Files
automatisch/packages/backend/src/apps/google-drive/common/get-current-user.ts
2023-03-23 19:10:43 +03:00

11 lines
305 B
TypeScript

import { IGlobalVariable } from '@automatisch/types';
const getCurrentUser = async ($: IGlobalVariable) => {
const { data: currentUser } = await $.http.get(
'https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses'
);
return currentUser;
};
export default getCurrentUser;