Previously, the helper proceeded to the filtering if the key '@base' was equal to 'entrances/'. The issue was that sub entities (like entrances in a cave) do not have the '@base' key.
Adds latitude, longitude and locations filtering in the toEntrance and toSimpleEntrance converters
Removes the removeSensitiveEntrances helper
Removes the latitude and longitude field in the cave (network) object as they are legacy fields, cave positions should come from its entrances.
Adding the isSensitive location filtering directly to the converters is more obvious and hopefully it will not be forgotten during a future refactoring. Also, it is more efficient as we don't need to recursive scan all keys of the each response anymore.
After a quick test, the front does not seem to be impacted by those changes
Previously, the helper proceeded to the filtering if the key '@base' was equal to 'entrances/'. The issue was that sub entities (like entrances in a cave) do not have the '@base' key.
Adding the isSensitive location filtering directly to the converters is more obvious and hopefully it will not be forgotten during a future refactoring. Also, it is more efficient as we don't need to recursive scan all keys of the each response anymore.
After a quick test, the front does not seem to be impacted by those changes