Files
SIG-CM/frontend/admin-panel/src/services/clientService.ts

16 lines
410 B
TypeScript
Raw Normal View History

2026-01-05 10:30:04 -03:00
// src/services/clientService.ts
2025-12-23 15:12:57 -03:00
import api from './api';
export const clientService = {
getAll: async () => {
const res = await api.get('/clients');
return res.data;
},
2026-01-05 10:30:04 -03:00
getSummary: async (id: number) => {
const res = await api.get(`/clients/${id}/summary`);
2025-12-23 15:12:57 -03:00
return res.data;
2026-01-05 10:30:04 -03:00
},
update: async (id: number, clientData: any) => {
await api.put(`/clients/${id}`, clientData);
2025-12-23 15:12:57 -03:00
}
};