mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-10-25 01:39:08 +00:00
feat: added create server
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import { api } from '../../../api/api';
|
||||
import type { ServerDTO } from './dto';
|
||||
import type { ServerDTO, CreateServerDTO } from './dto';
|
||||
|
||||
export const getServers = () => api.get<never, AxiosResponse<ServerDTO[]>>('/servers');
|
||||
export const getServers = () =>
|
||||
api.get<never, AxiosResponse<ServerDTO[]>>('/servers');
|
||||
|
||||
export const createServer = (params: CreateServerDTO ) =>
|
||||
api.post<AxiosResponse>('servers', params, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user