Skip to content

Commit 2b6d80d

Browse files
committed
fix: exit not being called
1 parent 4e85559 commit 2b6d80d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NetWizard.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ void NetWizard::_startHTTP() {
844844
}
845845
}).setFilter(this->_onAPFilter);
846846

847-
_exit_handler = &_server->on("/netwizard/exit", HTTP_GET, [&](AsyncWebServerRequest *request){
847+
_exit_handler = &_server->on("/netwizard/exit", HTTP_POST, [&](AsyncWebServerRequest *request){
848848
if(_nw.portal.auth.enabled && !request->authenticate(_nw.portal.auth.username.c_str(), _nw.portal.auth.password.c_str())){
849849
return request->requestAuthentication();
850850
}
@@ -854,8 +854,8 @@ void NetWizard::_startHTTP() {
854854
}
855855

856856
if (!_nw.portal.exit.flag) {
857-
_nw.portal.exit.flag = true;
858857
_nw.portal.exit.millis = millis();
858+
_nw.portal.exit.flag = true;
859859
}
860860
return request->send(200, "text/plain", "OK");
861861
}).setFilter(this->_onAPFilter);

0 commit comments

Comments
 (0)