website refactor
This commit is contained in:
@@ -5,6 +5,7 @@ import { TeamRatingEvent } from '@core/racing/domain/entities/TeamRatingEvent';
|
||||
import { TeamRatingEventId } from '@core/racing/domain/value-objects/TeamRatingEventId';
|
||||
import { TeamRatingDimensionKey } from '@core/racing/domain/value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingDelta } from '@core/racing/domain/value-objects/TeamRatingDelta';
|
||||
import { TeamRating } from '../../domain/entities/TeamRating';
|
||||
|
||||
// Mock repositories
|
||||
class MockTeamRatingEventRepository implements TeamRatingEventRepository {
|
||||
@@ -48,13 +49,13 @@ class MockTeamRatingEventRepository implements TeamRatingEventRepository {
|
||||
}
|
||||
|
||||
class MockTeamRatingRepository implements TeamRatingRepository {
|
||||
private snapshots: Map<string, any> = new Map();
|
||||
private snapshots: Map<string, TeamRating> = new Map();
|
||||
|
||||
async findByTeamId(teamId: string): Promise<any | null> {
|
||||
async findByTeamId(teamId: string): Promise<TeamRating | null> {
|
||||
return this.snapshots.get(teamId) || null;
|
||||
}
|
||||
|
||||
async save(snapshot: any): Promise<any> {
|
||||
async save(snapshot: TeamRating): Promise<TeamRating> {
|
||||
this.snapshots.set(snapshot.teamId, snapshot);
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user