fix crash
This commit is contained in:
parent
7ebf25d586
commit
dae0679e00
2 changed files with 2 additions and 21 deletions
|
@ -59,8 +59,6 @@ class MainWebServerClass{
|
|||
});
|
||||
|
||||
_server->on("/gpio", HTTP_POST, [&] (AsyncWebServerRequest *request) {
|
||||
String paramOutput;
|
||||
String paramState;
|
||||
|
||||
if(_authRequired){
|
||||
if(!request->authenticate(_username.c_str(), _password.c_str())){
|
||||
|
@ -70,8 +68,8 @@ class MainWebServerClass{
|
|||
|
||||
// GET input1 value on <ESP_IP>/gpio?output=<paramOutput>&state=<paramState>
|
||||
if (request->hasParam("output", true) && request->hasParam("state", true)) {
|
||||
paramOutput = request->getParam("output")->value();
|
||||
paramState = request->getParam("state")->value();
|
||||
String paramOutput = String(request->arg("output"));
|
||||
String paramState = String(request->arg("state"));
|
||||
|
||||
#ifdef RELAY1
|
||||
if (paramOutput == "relay1") {
|
||||
|
|
|
@ -5,25 +5,8 @@
|
|||
const char* password = "PASSWORD";
|
||||
#endif
|
||||
|
||||
#ifdef TINANCE2_BACKEND
|
||||
const char* tinance2_url_validatecard = "https://tinance2.domain.nl/accesscontrol/api/check-card-id";
|
||||
const char* tinance2_url_readerinfo = "https://tinance2.domain.nl/accesscontrol/api/readerinfo";
|
||||
const char* tinance2_url_acls = "https://tinance2.domain.nl/accesscontrol/api/acls";
|
||||
const char* tinance2_url_log = "https://tinance2.domain.nl/accesscontrol/api/readerlog";
|
||||
const char* tinance2_reader_identifer = "RDR-DOOR-01";
|
||||
const char* tinance2_reader_key = "REPLACE-WITH-UUID";
|
||||
#endif
|
||||
|
||||
#ifdef WEB_SERVER
|
||||
const char* http_username = "admin";
|
||||
const char* http_password = "PASSWORD";
|
||||
#endif
|
||||
|
||||
#ifdef WEBHOOKS
|
||||
#ifdef WEBHOOK_UNLOCK
|
||||
const char* webhook_unlock_url = "http://powerbar.ti/powerbar-space/12/on";
|
||||
#endif
|
||||
#ifdef WEBHOOK_LOCK
|
||||
const char* webhook_lock_url = "http://powerbar.ti/powerbar-space/12/off";
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue