feat(slack): add get-current-user helper

This commit is contained in:
Ali BARIN
2022-11-02 18:17:06 +01:00
parent 362c8dc25d
commit b4a4f47f78

View File

@@ -0,0 +1,13 @@
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
const getCurrentUser = async ($: IGlobalVariable): Promise<IJSONObject> => {
const params = {
user: $.auth.data.userId as string,
}
const response = await $.http.get('/users.info', { params });
const currentUser = response.data.user;
return currentUser;
};
export default getCurrentUser;