Feat Varios 4

This commit is contained in:
2026-01-06 14:20:44 -03:00
parent 9fa21ebec3
commit c6496099bd
16 changed files with 613 additions and 208 deletions

View File

@@ -2,8 +2,8 @@
import api from './api';
export const clientService = {
getAll: async () => {
const res = await api.get('/clients');
getAll: async (q?: string) => {
const res = await api.get('/clients', { params: { q } });
return res.data;
},
getSummary: async (id: number) => {
@@ -12,5 +12,9 @@ export const clientService = {
},
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;
}
};