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