feat: Convert all app files to JS
This commit is contained in:
11
packages/backend/src/apps/slack/common/get-current-user.js
Normal file
11
packages/backend/src/apps/slack/common/get-current-user.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const getCurrentUser = async ($) => {
|
||||
const params = {
|
||||
user: $.auth.data.userId,
|
||||
};
|
||||
const response = await $.http.get('/users.info', { params });
|
||||
const currentUser = response.data.user;
|
||||
|
||||
return currentUser;
|
||||
};
|
||||
|
||||
export default getCurrentUser;
|
Reference in New Issue
Block a user