mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add implementation for removeSystemIfExists
This commit is contained in:
@@ -148,28 +148,35 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
||||
}
|
||||
}
|
||||
|
||||
removeSystemIfExists(systemId: string): Promise<ISystem | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeSystemIfExists(systemId: string): Promise<ISystem | null> {
|
||||
const index = this.systems.findIndex((s) => s.id === systemId);
|
||||
if (index > -1) {
|
||||
const systemToReturn = this.systems[index];
|
||||
this.systems.splice(index, 1);
|
||||
return systemToReturn;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
removeRouteIfExists(routeId: string): Promise<IRoute | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeRouteIfExists(routeId: string): Promise<IRoute | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
removeStopIfExists(stopId: string): Promise<IStop | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeStopIfExists(stopId: string): Promise<IStop | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null> {
|
||||
return Promise.resolve(null);
|
||||
public async removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
public async clearSystemData() {
|
||||
|
||||
Reference in New Issue
Block a user