checkpoint
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
This commit is contained in:
11
client/src/api/UsersApi.ts
Normal file
11
client/src/api/UsersApi.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import api from "./axios.ts"
|
||||
import type { User } from "../models/User.ts";
|
||||
|
||||
const API_URL: string = "/users";
|
||||
|
||||
export const getUsers = () => api.get<User[]>(`${API_URL}`);
|
||||
|
||||
export const getUser = (id: number) => api.get<User>(`${API_URL}/${id}`);
|
||||
|
||||
export const deleteUser = (id: number) => api.delete<User>(`${API_URL}/${id}`);
|
||||
Reference in New Issue
Block a user