12 lines
342 B
TypeScript
12 lines
342 B
TypeScript
|
|
import api from "./axios.ts"
|
|
import type { UserDto } from "../models/User.ts";
|
|
|
|
const API_URL: string = "/users";
|
|
|
|
export const getUsers = () => api.get<UserDto[]>(`${API_URL}`);
|
|
|
|
export const getUser = (id: string) => api.get<UserDto>(`${API_URL}/${id}`);
|
|
|
|
export const deleteUser = (id: string) => api.delete<UserDto>(`${API_URL}/${id}`);
|