import { api } from "../../auth/http";

export const cargoService = {
  async getCargoes() {
    const response = await api.get('/cargoes');
    return response.data;
  },
  async createCargo(data: any) {
    const response = await api.post('/cargoes', data);
    return response.data;
  },
  async updateCargo(id: string, data: any) {
    const response = await api.patch(`/cargoes/${id}`, data);
    return response.data;
  },
  async deleteCargo(id: string) {
    await api.delete(`/cargoes/${id}`);
  },
};