change users crud to items
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 8s
Build and Deploy API / build-and-deploy (push) Successful in 10s

This commit is contained in:
2026-03-21 23:44:26 -05:00
parent a9b4d136d5
commit 7ab03d8073
13 changed files with 172 additions and 151 deletions

View File

@@ -1,18 +0,0 @@
// services are kinda whatever, but in general its a good idea for all api calls to be within a service (at least thats how angular handles it)
// this user service will handle all to <-> from the server when handling user objects
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 createUser = (data: User) => api.post<User>(`${API_URL}`, data);
export const updateUser = (id: number, data: User) => api.put<User>(`${API_URL}/${id}`, data);
export const deleteUser = (id: number) => api.delete<User>(`${API_URL}/${id}`);