bahnzumberg / zuugle-api

Public repositority for backend components of www.zuugle.at
https://www.zuugle.at
GNU General Public License v3.0
2 stars 3 forks source link

Fix map markers calls on api #112

Closed Falsal closed 4 months ago

Falsal commented 4 months ago

Make sure that the calls for markers array is being done properly in both cases when search-term is there (raw knex query) and in case search-term is not included

Falsal commented 4 months ago

loggers were added to test different cases of with and without search, it turns out this is an issue with the front end making multiple calls. See issue https://github.com/bahnzumberg/zuugle-suchseite/issues/331

Falsal commented 4 months ago

Done: code checked and found the markers query is being properly done in both cases.

Falsal commented 4 months ago

Added a NOTNULL condition for the markers query . So we would not have NULL values for the connection_arrival_stop_lon or connection_arrival_stop_lat sent to the FE. Situation now: We could have mismatch between total number of tours and the number of markers on the FE Potential solution : add the same condition to both cases (with or without search term), see "if(searchIncluded){ ...."

Falsal commented 4 months ago

on our meeting 31st May, the decision was to fix the data , so that we do not face the case when number of results for card container is different from the number of markers on the map. We also agreed to maintain the safe-guards (on api at least) for when such a case does come about.