rename methods in getter repository

This commit is contained in:
2025-04-07 19:06:03 -07:00
parent 495a946e78
commit 0076d987ca
7 changed files with 49 additions and 46 deletions

View File

@@ -15,7 +15,7 @@ export class UnoptimizedInMemoryShuttleRepository implements ShuttleGetterSetter
private subscribers: ((eta: IEta) => void)[] = [];
public async getStopsBySystemId(systemId: string) {
public async getStops(systemId: string) {
return this.stops.filter(stop => stop.systemId === systemId);
}
@@ -23,7 +23,7 @@ export class UnoptimizedInMemoryShuttleRepository implements ShuttleGetterSetter
return this.findEntityById(stopId, this.stops);
}
public async getRoutesBySystemId(systemId: string) {
public async getRoutes(systemId: string) {
return this.routes.filter(route => route.systemId === systemId);
}
@@ -31,7 +31,7 @@ export class UnoptimizedInMemoryShuttleRepository implements ShuttleGetterSetter
return this.findEntityById(routeId, this.routes);
}
public async getShuttlesBySystemId(systemId: string) {
public async getShuttles(systemId: string) {
return this.shuttles.filter(shuttle => shuttle.systemId === systemId);
}
@@ -43,7 +43,7 @@ export class UnoptimizedInMemoryShuttleRepository implements ShuttleGetterSetter
return this.findEntityById(shuttleId, this.shuttles);
}
public async getEtasForShuttleId(shuttleId: string) {
public async getEtas(shuttleId: string) {
return this.etas.filter(eta => eta.shuttleId === shuttleId);
}