refactor(github): replace generateRequest with $.http
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
import generateRequest from './generate-request';
|
||||
|
||||
const getCurrentUser = async ($: IGlobalVariable): Promise<IJSONObject> => {
|
||||
const response = await generateRequest($, {
|
||||
requestPath: '/user',
|
||||
method: 'GET',
|
||||
});
|
||||
const response = await $.http.get('/user');
|
||||
|
||||
const currentUser = response.data;
|
||||
return currentUser;
|
||||
|
||||
Reference in New Issue
Block a user