improve version check, #1497

This commit is contained in:
proddy
2025-03-30 14:51:59 +02:00
parent 83330907cd
commit 6991677cf9
14 changed files with 84 additions and 58 deletions

View File

@@ -5,12 +5,19 @@
#define EMSESP_ACTION_SERVICE_PATH "/rest/action"
#include <semver200.h> // for version checking
#include "../emsesp_version.h"
namespace emsesp {
class WebStatusService {
public:
WebStatusService(AsyncWebServer * server, SecurityManager * securityManager);
void set_current_version(const std::string & version) {
current_version_s = version;
}
std::string get_current_version() {
return current_version_s;
}
// make action function public so we can test in the debug and standalone mode
#ifndef EMSESP_STANDALONE
@@ -29,6 +36,8 @@ class WebStatusService {
bool uploadURL(const char * url);
bool setSystemStatus(const char * status);
void allvalues(JsonObject output);
std::string current_version_s = EMSESP_APP_VERSION;
};
} // namespace emsesp