GrottoCenter / grottocenter-api

Grottocenter API
https://api.grottocenter.org
GNU Affero General Public License v3.0
14 stars 2 forks source link

Entrance isSensitive coordinate filtering is not working for sub entities #1260

Closed vmarseguerra closed 7 months ago

vmarseguerra commented 7 months ago

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