when disabled do not send request

This commit is contained in:
Matthew Frost 2023-12-28 10:26:16 +01:00
parent 905907d8e4
commit 05b9eaf52c

View file

@ -611,11 +611,6 @@ void setup() {
bool isFirstRun = true; // Declare the missing variable
void updateDoorStatus() {
bool previousgetDoorDisabled = false; // Declare the missing variable
bool isFirstRun = true; // Declare the missing variable
if (settings.getDoorDisabled() != previousgetDoorDisabled && !isFirstRun) {
#ifdef SERIAL_DEBUG
@ -728,7 +723,14 @@ void loop() {
#endif
#ifdef TINANCE2_BACKEND
tinance2authrequest(String(fullCardID), String(cardID));
if (settings.getDoorDisabled()) {
#ifdef SERIAL_DEBUG
Serial.println("Door is disabled. Not sending request to Tinance2");
#endif
} else {
tinance2authrequest(String(fullCardID), String(cardID));
}
#endif
#ifdef LOCAL_ACL