import { apiClient } from './apiClient.js'

export const deliveriesApi = {
  create: (data) => apiClient.post('/api/deliveries', data).then((r) => r.data),


  getAll: () => apiClient.get('/api/deliveries').then((r) => r.data),

  getOne: (deliveryCode) => apiClient.get(`/api/deliveries/${deliveryCode}`).then((r) => r.data),
  update: (deliveryCode, payload) =>
    apiClient.put(`/api/deliveries/${deliveryCode}`, payload).then((r) => r.data),
  delete: (deliveryCode) => apiClient.delete(`/api/deliveries/${deliveryCode}`).then((r) => r.data),
}

