mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 08:18:20 +00:00
15 lines
434 B
TypeScript
15 lines
434 B
TypeScript
// import type { IStation } from "../types";
|
|
import { api } from "../utils/api";
|
|
import type { Passenger } from "@edr/types";
|
|
|
|
export const stationsService = {
|
|
list: async (): Promise<Passenger.IStation[]> => {
|
|
const { data } = await api.get("/stations");
|
|
return data.data;
|
|
},
|
|
get: async (id: string): Promise<Passenger.IStation> => {
|
|
const { data } = await api.get(`/stations/${id}`);
|
|
return data.data;
|
|
},
|
|
};
|