add method stubs in basic in-memory repository

This commit is contained in:
2025-02-02 12:51:25 -08:00
parent acfc91d3c1
commit 345d4905fe

View File

@@ -49,7 +49,7 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
public async getShuttleById(shuttleId: string) { public async getShuttleById(shuttleId: string) {
return this.findEntityById(shuttleId, this.shuttles); return this.findEntityById(shuttleId, this.shuttles);
} }
public async getEtasForShuttleId(shuttleId: string) { public async getEtasForShuttleId(shuttleId: string) {
return this.etas.filter(eta => eta.shuttleId === shuttleId); return this.etas.filter(eta => eta.shuttleId === shuttleId);
} }
@@ -58,6 +58,12 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
return this.etas.filter(eta => eta.stopId === stopId); return this.etas.filter(eta => eta.stopId === stopId);
} }
public async subscribeToEtaChanges(listener: (eta: IEta) => void): Promise<void> {
}
public async unsubscribeFromEtaChanges(listener: (eta: IEta) => void): Promise<void> {
}
public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string) { public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string) {
return this.findEntityByMatcher<IEta>((value) => value.stopId === stopId && value.shuttleId === shuttleId, this.etas); return this.findEntityByMatcher<IEta>((value) => value.stopId === stopId && value.shuttleId === shuttleId, this.etas);
} }
@@ -209,4 +215,4 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
this.stops = []; this.stops = [];
} }
} }