diff --git a/include/mainwebserver.h b/include/mainwebserver.h index befdc26..1aef68c 100644 --- a/include/mainwebserver.h +++ b/include/mainwebserver.h @@ -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 /gpio?output=&state= 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") { diff --git a/src/secrets.cpp.dist b/src/secrets.cpp.dist index 3c2b6e1..8175918 100644 --- a/src/secrets.cpp.dist +++ b/src/secrets.cpp.dist @@ -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