linting
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Mock repository for testing and development
|
||||
*/
|
||||
|
||||
import type { SeasonSponsorship, SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
|
||||
import type { ISeasonSponsorshipRepository } from '../../domain/repositories/ISeasonSponsorshipRepository';
|
||||
import type { SeasonSponsorship, SponsorshipTier } from '@core/racing/domain/entities/SeasonSponsorship';
|
||||
import type { ISeasonSponsorshipRepository } from '@core/racing/domain/repositories/ISeasonSponsorshipRepository';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRepository {
|
||||
@@ -31,7 +31,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
}
|
||||
return sponsorship;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding season sponsorship by id ${id}:`, error);
|
||||
this.logger.error(`Error finding season sponsorship by id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.info(`Found ${sponsorships.length} season sponsorships for season id: ${seasonId}.`);
|
||||
return sponsorships;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding season sponsorships by season id ${seasonId}:`, error);
|
||||
this.logger.error(`Error finding season sponsorships by season id ${seasonId}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.info(`Found ${sponsorships.length} season sponsorships for league id: ${leagueId}.`);
|
||||
return sponsorships;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding season sponsorships by league id ${leagueId}:`, error);
|
||||
this.logger.error(`Error finding season sponsorships by league id ${leagueId}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.info(`Found ${sponsorships.length} season sponsorships for sponsor id: ${sponsorId}.`);
|
||||
return sponsorships;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding season sponsorships by sponsor id ${sponsorId}:`, error);
|
||||
this.logger.error(`Error finding season sponsorships by sponsor id ${sponsorId}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.info(`SeasonSponsorship ${sponsorship.id} created successfully.`);
|
||||
return sponsorship;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error creating season sponsorship ${sponsorship.id}:`, error);
|
||||
this.logger.error(`Error creating season sponsorship ${sponsorship.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.info(`SeasonSponsorship ${sponsorship.id} updated successfully.`);
|
||||
return sponsorship;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error updating season sponsorship ${sponsorship.id}:`, error);
|
||||
this.logger.error(`Error updating season sponsorship ${sponsorship.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.warn(`SeasonSponsorship with id ${id} not found for deletion.`);
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(`Error deleting season sponsorship ${id}:`, error);
|
||||
this.logger.error(`Error deleting season sponsorship ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
this.logger.debug(`SeasonSponsorship ${id} exists: ${exists}.`);
|
||||
return exists;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error checking existence of season sponsorship with id ${id}:`, error);
|
||||
this.logger.error(`Error checking existence of season sponsorship with id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRe
|
||||
}
|
||||
this.logger.info(`Successfully seeded ${sponsorships.length} season sponsorships.`);
|
||||
} catch (error) {
|
||||
this.logger.error(`Error seeding season sponsorships:`, error);
|
||||
this.logger.error(`Error seeding season sponsorships:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user