code quality

This commit is contained in:
2026-01-26 17:47:37 +01:00
parent 9ac74f5046
commit 3a4f460a7d
21 changed files with 121 additions and 58 deletions

View File

@@ -41,7 +41,17 @@ export class ProtestReviewMutation implements Mutation<ApplyPenaltyCommand | Req
async applyPenalty(input: ApplyPenaltyCommand): Promise<Result<void, DomainError>> {
try {
const result = await this.service.applyPenalty(input);
const dto = {
raceId: input.raceId,
driverId: input.accusedDriverId,
stewardId: 'system', // Missing in command
type: input.penaltyType,
value: input.penaltyValue,
reason: input.reason,
protestId: input.protestId,
notes: input.stewardNotes
};
const result = await this.service.applyPenalty(dto);
if (result.isErr()) {
return Result.err(result.getError());
}