import { api as api } from '../../api'; import { presentRaceDetail } from '../../presenters'; import { RaceDetailViewModel } from '../../view-models'; export async function getRaceDetail( raceId: string, driverId: string ): Promise { const dto = await api.races.getDetail(raceId, driverId); return presentRaceDetail(dto); } export async function getRacesPageData(): Promise { const dto = await api.races.getPageData(); // TODO: use presenter return dto; } export async function getRacesTotal(): Promise { const dto = await api.races.getTotal(); return dto; }