Can you check if we did finish the dual api upload-url? One should be going to the…
- User
Can you check if we did finish the dual api upload-url? One should be going to the api.safecast.org and the other one should got to simplemap.safecast.org. Both should use the same API keys.
Assistant
Let me check the current state of the dual API upload URL feature on this branch.
Assistant
Let me check the actual upload logic in log_viewer.cpp to see how the endpoint is used.
Assistant
The feature is not finished as intended. Here's the status:
What's implemented:
_api_logfile_destflag (0 = primary, 1 = secondary) stored in NVS_api_logfile_endpoint_2configurable via SD card config file- Upload logic in log_viewer.cpp:361-363 selects one or the other endpoint
Two bugs:
-
user_config.h:110 —
API_LOGFILE_ENDPOINT_2still points toapi.safecast.orginstead ofsimplemap.safecast.org(copy-paste error):c#define API_LOGFILE_ENDPOINT_2 "https://" API_HOST "/bgeigie_imports.json" // wrong
- User
The idea is not to upload to two at the same time. It should be the api.safecast.org or simplemap.safecast.org
Assistant
Got it — so the design is correct (pick one). The feature is almost done, just two fixes needed:
- user_config.h:110 —
API_LOGFILE_ENDPOINT_2wrongly usesAPI_HOST(api.safecast.org) instead of simplemap - user_config.h:138 —
D_API_LOGFILE_ENDPOINT_2defaults to empty string instead of the simplemap URL
The simplemap endpoint would be
https://simplemap.safecast.org/bgeigie_imports.json— same path, different host. Want me to fix those two defines and set simplemap as the hardcoded default for the secondary endpoint?- user_config.h:110 —
- User
yes, fix those two issue, commit and push to Gihub and Codeberg..
Assistant
Now fix the default:
Assistant
Now commit and push to both remotes.
Assistant
Diff looks correct. Committing and pushing to both remotes.