mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename get system method on shuttle repository, update tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { IEta, IOrderedStop, IRoute, IShuttle, IStop, ISystem } from "../entities/entities";
|
||||
|
||||
export interface ShuttleGetterRepository {
|
||||
getSystems(): Promise<ISystem[]>;
|
||||
getSystemIfExists(): Promise<ISystem[]>;
|
||||
getSystemById(systemId: string): Promise<ISystem | null>;
|
||||
|
||||
getStopsBySystemId(systemId: string): Promise<IStop[]>;
|
||||
|
||||
@@ -16,7 +16,7 @@ export class UnoptimizedInMemoryShuttleRepository implements ShuttleGetterSetter
|
||||
|
||||
private subscribers: ((eta: IEta) => void)[] = [];
|
||||
|
||||
public async getSystems() {
|
||||
public async getSystemIfExists() {
|
||||
return this.systems;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user