Updated http_server.cpp api/settings data #4782
Replies: 3 comments 2 replies
-
or into a map structure
|
Beta Was this translation helpful? Give feedback.
-
Created a Python script to extract the settings from the main.lua so if it is updated it will pull the new settings and create the http_server.cpp |
Beta Was this translation helpful? Give feedback.
-
This approach won't safely scale over time. As new settings are added and old settings are removed, these hard-coded entries will rot. I'm also not keen to introduce a script to populate this, given that it's not a well-used or widely-known feature. A better way of handling this (especially because settings are backed with https://en.cppreference.com/w/cpp/utility/variant/visit The settings output JSON also needs to be cached. |
Beta Was this translation helpful? Give feedback.
-
I spent an hour or 2, not sure anymore dumping data into the http_server.cpp file, recompiled it and testing then making it easier to read, almost all of the main.lua besides the TRUST_ALTER_EGO messages gets pulled into the api/settings page now
Beta Was this translation helpful? Give feedback.
All reactions