From f8f2b71901af396864df7e9992435ce00278964e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bo=CC=88hm?= Date: Thu, 21 Nov 2024 10:21:39 +0100 Subject: [PATCH] fix typos in webapi --- src/WebApi_solar_charger.cpp | 2 +- src/WebApi_ws_live.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebApi_solar_charger.cpp b/src/WebApi_solar_charger.cpp index 5579bae88..6936aa1ee 100644 --- a/src/WebApi_solar_charger.cpp +++ b/src/WebApi_solar_charger.cpp @@ -64,7 +64,7 @@ void WebApiSolarChargerlass::onAdminPost(AsyncWebServerRequest* request) if (!root["enabled"].is() || !root["provider"].is() || !root["verbose_logging"].is() || - !root["updates_only"].is() ) { + !root["publish_updates_only"].is() ) { retMsg["message"] = "Values are missing!"; retMsg["code"] = WebApiError::GenericValueMissing; WebApi.sendJsonResponse(request, response, __FUNCTION__, __LINE__); diff --git a/src/WebApi_ws_live.cpp b/src/WebApi_ws_live.cpp index 0bec73e06..03864868c 100644 --- a/src/WebApi_ws_live.cpp +++ b/src/WebApi_ws_live.cpp @@ -75,7 +75,7 @@ void WebApiWsLiveClass::generateOnBatteryJsonResponse(JsonVariant& root, bool al auto solarChargerAge = SolarCharger.getDataAgeMillis(); if (all || (solarChargerAge > 0 && (millis() - _lastPublishSolarCharger) > solarChargerAge)) { auto solarchargerObj = root["solarcharger"].to(); - solarchargerObj["solarcharger"] = config.SolarCharger.Enabled; + solarchargerObj["enabled"] = config.SolarCharger.Enabled; if (config.SolarCharger.Enabled) { auto totalVeObj = solarchargerObj["total"].to();