refactor
This commit is contained in:
@@ -5,12 +5,8 @@ import { Logger } from '@core/shared/application';
|
||||
export class InMemoryRaceRepository implements IRaceRepository {
|
||||
private races: Map<string, Race> = new Map();
|
||||
|
||||
constructor(private readonly logger: Logger, initialRaces: Race[] = []) {
|
||||
constructor(private readonly logger: Logger) {
|
||||
this.logger.info('InMemoryRaceRepository initialized.');
|
||||
for (const race of initialRaces) {
|
||||
this.races.set(race.id, race);
|
||||
this.logger.debug(`Seeded race: ${race.id} (${race.track}).`);
|
||||
}
|
||||
}
|
||||
|
||||
async findById(id: string): Promise<Race | null> {
|
||||
|
||||
Reference in New Issue
Block a user