import api from './api';

const BASE = '/iso-tasks';

const isoService = {
    getAll: async (params = {}) => {
        const res = await api.get(BASE, { params });
        return res.data.data;
    },
    create: async (data) => {
        const res = await api.post(BASE, data);
        return res.data.data;
    },
    update: async (id, data) => {
        const res = await api.put(`${BASE}/${id}`, data);
        return res.data.data;
    },
    delete: async (id) => {
        await api.delete(`${BASE}/${id}`);
    },
};

export default isoService;
