Files
jardin/frontend/src/api/astuces.js
T
2026-02-22 18:34:50 +01:00

9 lines
415 B
JavaScript

import client from './client';
export const astucesApi = {
list: (params) => client.get('/api/astuces', { params }).then(r => r.data),
get: (id) => client.get(`/api/astuces/${id}`).then(r => r.data),
create: (a) => client.post('/api/astuces', a).then(r => r.data),
update: (id, a) => client.put(`/api/astuces/${id}`, a).then(r => r.data),
remove: (id) => client.delete(`/api/astuces/${id}`),
};