Skip to content

Commit

Permalink
fix typos in webapi
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed Nov 21, 2024
1 parent 55ec4ea commit f8f2b71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/WebApi_solar_charger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void WebApiSolarChargerlass::onAdminPost(AsyncWebServerRequest* request)
if (!root["enabled"].is<bool>() ||
!root["provider"].is<uint8_t>() ||
!root["verbose_logging"].is<bool>() ||
!root["updates_only"].is<bool>() ) {
!root["publish_updates_only"].is<bool>() ) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
WebApi.sendJsonResponse(request, response, __FUNCTION__, __LINE__);
Expand Down
2 changes: 1 addition & 1 deletion src/WebApi_ws_live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<JsonObject>();
solarchargerObj["solarcharger"] = config.SolarCharger.Enabled;
solarchargerObj["enabled"] = config.SolarCharger.Enabled;

if (config.SolarCharger.Enabled) {
auto totalVeObj = solarchargerObj["total"].to<JsonObject>();
Expand Down

0 comments on commit f8f2b71

Please sign in to comment.