mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
update stub methods to clarify behavior
This commit is contained in:
@@ -19,12 +19,12 @@ export interface GetterSetterRepository extends GetterRepository {
|
|||||||
addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>;
|
addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>;
|
||||||
addOrUpdateEta(eta: IEta): Promise<void>;
|
addOrUpdateEta(eta: IEta): Promise<void>;
|
||||||
|
|
||||||
removeSystem(systemId: string): Promise<void>;
|
removeSystemIfExists(systemId: string): Promise<ISystem | null>;
|
||||||
removeRoute(routeId: string): Promise<void>;
|
removeRouteIfExists(routeId: string): Promise<IRoute | null>;
|
||||||
removeShuttle(shuttleId: string): Promise<void>;
|
removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null>;
|
||||||
removeStop(stopId: string): Promise<void>;
|
removeStopIfExists(stopId: string): Promise<IStop | null>;
|
||||||
removeOrderedStop(stopId: string, routeId: string): Promise<void>;
|
removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null>;
|
||||||
removeEta(shuttleId: string, stopId: string): Promise<void>;
|
removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null>;
|
||||||
|
|
||||||
clearSystemData(): Promise<void>;
|
clearSystemData(): Promise<void>;
|
||||||
clearRouteData(): Promise<void>;
|
clearRouteData(): Promise<void>;
|
||||||
|
|||||||
@@ -148,24 +148,30 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeSystemIfExists(systemId: string): Promise<ISystem | null> {
|
||||||
public async removeEta(shuttleId: string, stopId: string): Promise<void> {
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeOrderedStop(stopId: string, routeId: string): Promise<void> {
|
removeRouteIfExists(routeId: string): Promise<IRoute | null> {
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeRoute(routeId: string): Promise<void> {
|
removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null> {
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeShuttle(shuttleId: string): Promise<void> {
|
removeStopIfExists(stopId: string): Promise<IStop | null> {
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeStop(stopId: string): Promise<void> {
|
removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null> {
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async removeSystem(systemId: string): Promise<void> {
|
removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null> {
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async clearSystemData() {
|
public async clearSystemData() {
|
||||||
this.systems = [];
|
this.systems = [];
|
||||||
}
|
}
|
||||||
@@ -189,4 +195,5 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
|||||||
public async clearStopData(): Promise<void> {
|
public async clearStopData(): Promise<void> {
|
||||||
this.stops = [];
|
this.stops = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user