mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-10-24 01:09:08 +00:00
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
import type { AxiosResponse } from 'axios';
|
|
import { api } from '../../../api/api';
|
|
import type { ServerDTO, CreateServerDTO } from './dto';
|
|
|
|
export const getServers = () =>
|
|
api.get<never, AxiosResponse<ServerDTO[]>>('/servers');
|
|
|
|
export const createServer = (params: CreateServerDTO ) =>
|
|
api.post<AxiosResponse>('servers', params, {
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
});
|