Files
jardin/frontend/src/api/tasks.js
2026-02-22 04:12:35 +01:00

9 lines
403 B
JavaScript

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