16 lines
576 B
TypeScript
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();
|
|
} |