Code formatting without functional changes
This commit is contained in:
parent
658a42db80
commit
a68c553d27
@ -125,7 +125,8 @@ void WebApiDeviceClass::onDeviceAdminPost(AsyncWebServerRequest* request)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(root.containsKey("curPin") || root.containsKey("display"))) {
|
if (!(root.containsKey("curPin")
|
||||||
|
|| root.containsKey("display"))) {
|
||||||
retMsg["message"] = "Values are missing!";
|
retMsg["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
@ -89,7 +89,11 @@ void WebApiDtuClass::onDtuAdminPost(AsyncWebServerRequest* request)
|
|||||||
return;
|
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["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
@ -121,7 +121,8 @@ void WebApiInverterClass::onInverterAdd(AsyncWebServerRequest* request)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(root.containsKey("serial") && root.containsKey("name"))) {
|
if (!(root.containsKey("serial")
|
||||||
|
&& root.containsKey("name"))) {
|
||||||
retMsg["message"] = "Values are missing!";
|
retMsg["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
@ -119,7 +119,15 @@ void WebApiNetworkClass::onNetworkAdminPost(AsyncWebServerRequest* request)
|
|||||||
return;
|
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["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
@ -133,7 +133,11 @@ void WebApiNtpClass::onNtpAdminPost(AsyncWebServerRequest* request)
|
|||||||
return;
|
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["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
@ -90,7 +90,8 @@ void WebApiPowerClass::onPowerPost(AsyncWebServerRequest* request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(root.containsKey("serial")
|
if (!(root.containsKey("serial")
|
||||||
&& (root.containsKey("power") || root.containsKey("restart")))) {
|
&& (root.containsKey("power")
|
||||||
|
|| root.containsKey("restart")))) {
|
||||||
retMsg["message"] = "Values are missing!";
|
retMsg["message"] = "Values are missing!";
|
||||||
retMsg["code"] = WebApiError::GenericValueMissing;
|
retMsg["code"] = WebApiError::GenericValueMissing;
|
||||||
response->setLength();
|
response->setLength();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user