mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 17:38:12 +00:00
19 lines
510 B
TypeScript
19 lines
510 B
TypeScript
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}`);
|
|
},
|
|
}; |