From 2b67ed433d0eb62d00ec734499c6313240e159b9 Mon Sep 17 00:00:00 2001 From: Julian Gog <julian.gog@aerq.com> Date: Fri, 28 Jul 2023 16:25:55 +0200 Subject: [PATCH] Feature(web/RestApi): re-adding version and build number to api --- src/web/RestApi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/web/RestApi.h b/src/web/RestApi.h index 0f7f8112..dcc67513 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -197,6 +197,8 @@ class RestApi { void getGeneric(AsyncWebServerRequest *request, JsonObject obj) { obj[F("wifi_rssi")] = (WiFi.status() != WL_CONNECTED) ? 0 : WiFi.RSSI(); obj[F("ts_uptime")] = mApp->getUptime(); + obj[F("version")] = String(mApp->getVersion()); + obj[F("build")] = String(AUTO_GIT_HASH); obj[F("menu_prot")] = mApp->getProtection(request); obj[F("menu_mask")] = (uint16_t)(mConfig->sys.protectionMask ); obj[F("menu_protEn")] = (bool) (strlen(mConfig->sys.adminPwd) > 0);