remove core from pages

This commit is contained in:
2025-12-18 19:14:50 +01:00
parent 9814d9682c
commit 4a3087ae35
35 changed files with 552 additions and 354 deletions

View File

@@ -0,0 +1,28 @@
import { PenaltiesApiClient } from '../../api/penalties/PenaltiesApiClient';
/**
* Penalty Service
*
* Orchestrates penalty operations by coordinating API calls and view model creation.
* All dependencies are injected via constructor.
*/
export class PenaltyService {
constructor(
private readonly apiClient: PenaltiesApiClient
) {}
/**
* Find penalties by race ID
*/
async findByRaceId(raceId: string): Promise<any[]> {
const dto = await this.apiClient.getRacePenalties(raceId);
return dto.penalties;
}
/**
* Apply a penalty
*/
async applyPenalty(input: any): Promise<void> {
await this.apiClient.applyPenalty(input);
}
}