Files
automatisch/packages/backend/src/apps/google-forms/common/get-current-user.ts
2023-01-03 19:06:04 +01: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;