Files
automatisch/packages/backend/src/apps/mattermost/common/get-current-user.ts
KrzysztofDK 676027245f feat(mattermost): add auth and send message to channel action
* feat: mattermost integration

* post review adjustments
2023-06-29 16:45:57 +02:00

10 lines
296 B
TypeScript

import { IGlobalVariable, IJSONObject } from '@automatisch/types';
const getCurrentUser = async ($: IGlobalVariable): Promise<IJSONObject> => {
const response = await $.http.get('/api/v4/users/me');
const currentUser = response.data;
return currentUser;
};
export default getCurrentUser;