mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add method stubs in basic in-memory repository
This commit is contained in:
@@ -49,7 +49,7 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
||||
public async getShuttleById(shuttleId: string) {
|
||||
return this.findEntityById(shuttleId, this.shuttles);
|
||||
}
|
||||
|
||||
|
||||
public async getEtasForShuttleId(shuttleId: string) {
|
||||
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);
|
||||
}
|
||||
|
||||
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) {
|
||||
return this.findEntityByMatcher<IEta>((value) => value.stopId === stopId && value.shuttleId === shuttleId, this.etas);
|
||||
}
|
||||
@@ -209,4 +215,4 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
||||
this.stops = [];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user