fix issues in core

This commit is contained in:
2025-12-23 15:38:50 +01:00
parent df5c20c5cc
commit 120d3bb1a1
125 changed files with 1005 additions and 793 deletions

View File

@@ -55,11 +55,11 @@ export class FileProtestUseCase {
// Validate protesting driver is a member of the league
const memberships = await this.leagueMembershipRepository.getLeagueMembers(race.leagueId);
const protestingDriverMembership = memberships.find(m => {
const driverId = (m as any).driverId;
const status = (m as any).status;
return driverId === command.protestingDriverId && status === 'active';
});
const protestingDriverMembership = memberships.find(
m =>
m.driverId.toString() === command.protestingDriverId &&
m.status.toString() === 'active',
);
if (!protestingDriverMembership) {
return Result.err({ code: 'NOT_MEMBER', details: { message: 'Protesting driver is not an active member of this league' } });