more seeds

This commit is contained in:
2025-12-27 11:58:35 +01:00
parent 91612e4256
commit 3efa978ee0
25 changed files with 806 additions and 55 deletions

View File

@@ -7,6 +7,20 @@ export class InMemoryGameRepository implements IGameRepository {
constructor(private readonly logger: Logger) {
this.logger.info('InMemoryGameRepository initialized.');
this.seedDefaults();
}
private seedDefaults(): void {
const defaults = [
Game.create({ id: 'iracing', name: 'iRacing' }),
Game.create({ id: 'acc', name: 'Assetto Corsa Competizione' }),
Game.create({ id: 'f1-24', name: 'F1 24' }),
Game.create({ id: 'f1-23', name: 'F1 23' }),
];
for (const game of defaults) {
this.games.set(game.id.toString(), game);
}
}
async findById(id: string): Promise<Game | null> {