fix getWaypoints
This commit is contained in:
@@ -39,18 +39,22 @@ export class ReadjsonService{
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
getWaypoints(location: string, id: number): Observable<waypoint[]> {
|
||||
return this.locations.pipe(
|
||||
map((locations) => {
|
||||
const foundLocation: Locations | undefined = locations.find((loc: Locations) => loc.location === location);
|
||||
if (foundLocation?.waypoints) {
|
||||
return foundLocation ? foundLocation.waypoints.filter((way: waypoint) => way.id === id) : [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}),
|
||||
tap(data => console.log("data requested", data))
|
||||
);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user