mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 00:10:57 +00:00
15 lines
449 B
TypeScript
15 lines
449 B
TypeScript
import type { Freight, PaginatedResponse } from "@edr/types";
|
|
|
|
import { client } from "../utils/api";
|
|
|
|
export const consignmentsService = {
|
|
list: async (): Promise<PaginatedResponse<Freight.IConsignment>> => {
|
|
const { data } = await client.get("/consignments");
|
|
return data.data;
|
|
},
|
|
get: async (id: string): Promise<Freight.IConsignment> => {
|
|
const { data } = await client.get(`/consignments/${id}`);
|
|
return data.data;
|
|
},
|
|
};
|