Files
gridpilot.gg/apps/website/lib/services/drivers/DriverService.ts
2025-12-17 18:01:47 +01:00

16 lines
576 B
TypeScript

import { api as api } from '../../api';
import { presentDriversLeaderboard } from '../../presenters';
import { DriverLeaderboardViewModel } from '../../view-models';
export async function getDriverLeaderboard(): Promise<DriverLeaderboardViewModel> {
const dto = await api.drivers.getLeaderboard();
return presentDriversLeaderboard(dto);
}
export async function completeDriverOnboarding(input: any): Promise<any> {
return await api.drivers.completeOnboarding(input);
}
export async function getCurrentDriver(): Promise<any> {
return await api.drivers.getCurrent();
}