Files
SIG-CM/frontend/admin-panel/src/services/clientService.ts
2026-01-06 14:20:44 -03:00

20 lines
571 B
TypeScript

// src/services/clientService.ts
import api from './api';
export const clientService = {
getAll: async (q?: string) => {
const res = await api.get('/clients', { params: { q } });
return res.data;
},
getSummary: async (id: number) => {
const res = await api.get(`/clients/${id}/summary`);
return res.data;
},
update: async (id: number, clientData: any) => {
await api.put(`/clients/${id}`, clientData);
},
resetPassword: async (id: number) => {
const res = await api.post(`/clients/${id}/reset-password`);
return res.data;
}
};