implement route removal

This commit is contained in:
2025-01-22 20:10:50 -08:00
parent 144fa7c852
commit e9703e53ae

View File

@@ -156,6 +156,13 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
} }
public async removeRouteIfExists(routeId: string): Promise<IRoute | null> { public async removeRouteIfExists(routeId: string): Promise<IRoute | null> {
const index = this.findEntityIndexById(routeId, this.routes);
if (index > -1) {
const routeToReturn = this.routes[index];
this.routes.splice(index, 1);
return routeToReturn;
}
return null; return null;
} }