Files
OutFleet/client/src/features/servers/duck/api.ts

14 lines
408 B
TypeScript
Raw Normal View History

2025-10-11 00:20:28 +03:00
import type { AxiosResponse } from 'axios';
import { api } from '../../../api/api';
2025-10-11 01:32:59 +03:00
import type { ServerDTO, CreateServerDTO } from './dto';
2025-10-11 00:20:28 +03:00
2025-10-11 01:32:59 +03:00
export const getServers = () =>
api.get<never, AxiosResponse<ServerDTO[]>>('/servers');
export const createServer = (params: CreateServerDTO ) =>
api.post<AxiosResponse>('servers', params, {
headers: {
'Content-Type': 'application/json',
},
});