Spaces:
Running
Running
File size: 361 Bytes
308a91d 454ca1f 308a91d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import api from './axios';
export const getCategories = (params = {}) =>
api.get('/api/categories/', { params });
export const createCategory = (data) =>
api.post('/api/categories/', data);
export const updateCategory = (id, data) =>
api.put(`/api/categories/${id}`, data);
export const deleteCategory = (id) =>
api.delete(`/api/categories/${id}`);
|