feat: Convert all app files to JS
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import { TBeforeRequest } from '@automatisch/types';
|
||||
|
||||
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
|
||||
const addAuthHeader = ($, requestConfig) => {
|
||||
const authData = $.auth.data;
|
||||
if (
|
||||
requestConfig.headers &&
|
@@ -1,8 +1,6 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
const getCurrentUser = async ($: IGlobalVariable): Promise<IJSONObject> => {
|
||||
const getCurrentUser = async ($) => {
|
||||
const params = {
|
||||
user: $.auth.data.userId as string,
|
||||
user: $.auth.data.userId,
|
||||
};
|
||||
const response = await $.http.get('/users.info', { params });
|
||||
const currentUser = response.data.user;
|
Reference in New Issue
Block a user