9 lines
415 B
JavaScript
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}`),
|
|
};
|