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

12 lines
484 B
TypeScript

import { api as api } from '../../api';
import { presentPayment } from '../../presenters';
import { PaymentViewModel } from '../../view-models';
export async function getPayments(leagueId?: string, driverId?: string): Promise<PaymentViewModel[]> {
const dto = await api.payments.getPayments(leagueId, driverId);
return dto.payments.map(p => presentPayment(p));
}
export async function createPayment(input: any): Promise<any> {
return await api.payments.createPayment(input);
}