mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 17:59:53 +03:00
improve version check, #1497
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user