Moved dto from package to folder

This commit is contained in:
2022-08-25 23:42:12 +02:00
parent 3e4846e447
commit 5e08dd0f53
38 changed files with 21 additions and 1522 deletions

View File

@@ -1,5 +1,4 @@
import { Requests, Responses, UserRole } from 'dto';
import { get_token, post_token } from './base';
import { Requests, Responses, UserRole, get_token, post_token } from './base';
export const get_users = (token: string): Promise<Responses.Admin.GetUsers> =>
get_token('/api/admin/users', token);

View File

@@ -1,6 +1,6 @@
import axios from 'axios';
import { Requests, Responses } from 'dto';
export { Requests, Responses };
import { Requests, Responses, UserRole } from '../../../dto';
export { Requests, Responses, UserRole };
export const post = <T extends Requests.BaseRequest>(url: string, data: T) =>
axios

View File

@@ -1,6 +1,4 @@
export { Requests, Responses } from 'dto';
export { isErrorResponse } from './base';
export { Requests, Responses, UserRole, isErrorResponse } from './base';
export * as Auth from './auth';
export * as FS from './fs';
export * as User from './user';

View File

@@ -1,5 +1,4 @@
import { get_token, post_token } from '@/api/base';
import { Responses } from 'dto';
import { Responses, get_token, post_token } from '@/api/base';
export const get_user_info = (
token: string