Skip to content

Commit

Permalink
Code formatting without functional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Jul 22, 2023
1 parent 658a42d commit a68c553
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/WebApi_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ void WebApiDeviceClass::onDeviceAdminPost(AsyncWebServerRequest* request)
return;
}

if (!(root.containsKey("curPin") || root.containsKey("display"))) {
if (!(root.containsKey("curPin")
|| root.containsKey("display"))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down
6 changes: 5 additions & 1 deletion src/WebApi_dtu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ void WebApiDtuClass::onDtuAdminPost(AsyncWebServerRequest* request)
return;
}

if (!(root.containsKey("serial") && root.containsKey("pollinterval") && root.containsKey("nrf_palevel") && root.containsKey("cmt_palevel") && root.containsKey("cmt_frequency"))) {
if (!(root.containsKey("serial")
&& root.containsKey("pollinterval")
&& root.containsKey("nrf_palevel")
&& root.containsKey("cmt_palevel")
&& root.containsKey("cmt_frequency"))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down
3 changes: 2 additions & 1 deletion src/WebApi_inverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void WebApiInverterClass::onInverterAdd(AsyncWebServerRequest* request)
return;
}

if (!(root.containsKey("serial") && root.containsKey("name"))) {
if (!(root.containsKey("serial")
&& root.containsKey("name"))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down
10 changes: 9 additions & 1 deletion src/WebApi_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,15 @@ void WebApiNetworkClass::onNetworkAdminPost(AsyncWebServerRequest* request)
return;
}

if (!(root.containsKey("ssid") && root.containsKey("password") && root.containsKey("hostname") && root.containsKey("dhcp") && root.containsKey("ipaddress") && root.containsKey("netmask") && root.containsKey("gateway") && root.containsKey("dns1") && root.containsKey("dns2"))) {
if (!(root.containsKey("ssid")
&& root.containsKey("password")
&& root.containsKey("hostname")
&& root.containsKey("dhcp")
&& root.containsKey("ipaddress")
&& root.containsKey("netmask")
&& root.containsKey("gateway")
&& root.containsKey("dns1")
&& root.containsKey("dns2"))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down
6 changes: 5 additions & 1 deletion src/WebApi_ntp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ void WebApiNtpClass::onNtpAdminPost(AsyncWebServerRequest* request)
return;
}

if (!(root.containsKey("ntp_server") && root.containsKey("ntp_timezone") && root.containsKey("longitude") && root.containsKey("latitude") && root.containsKey("sunsettype"))) {
if (!(root.containsKey("ntp_server")
&& root.containsKey("ntp_timezone")
&& root.containsKey("longitude")
&& root.containsKey("latitude")
&& root.containsKey("sunsettype"))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down
3 changes: 2 additions & 1 deletion src/WebApi_power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ void WebApiPowerClass::onPowerPost(AsyncWebServerRequest* request)
}

if (!(root.containsKey("serial")
&& (root.containsKey("power") || root.containsKey("restart")))) {
&& (root.containsKey("power")
|| root.containsKey("restart")))) {
retMsg["message"] = "Values are missing!";
retMsg["code"] = WebApiError::GenericValueMissing;
response->setLength();
Expand Down

0 comments on commit a68c553

Please sign in to comment.