mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 19:12:10 +01:00
Fix scoping issue when setting the IP address #100
This commit is contained in:
parent
9fdf5896d1
commit
f62dcef161
5 changed files with 22 additions and 4 deletions
2
Web.cpp
2
Web.cpp
|
|
@ -1684,6 +1684,7 @@ void Web::begin() {
|
|||
});
|
||||
server.on("/updateFirmware", HTTP_POST, []() {
|
||||
webServer.sendCORSHeaders();
|
||||
somfy.transceiver.end(); // Shut down the radio so we do not get any interrupts during this process.
|
||||
if(server.method() == HTTP_OPTIONS) { server.send(200, "OK"); return; }
|
||||
if (Update.hasError())
|
||||
server.send(500, _encoding_json, "{\"status\":\"ERROR\",\"desc\":\"Error updating firmware: \"}");
|
||||
|
|
@ -1740,6 +1741,7 @@ void Web::begin() {
|
|||
});
|
||||
server.on("/updateApplication", HTTP_POST, []() {
|
||||
webServer.sendCORSHeaders();
|
||||
somfy.transceiver.end(); // Shut down the radio so we do not get any interrupts during this process.
|
||||
if(server.method() == HTTP_OPTIONS) { server.send(200, "OK"); return; }
|
||||
server.sendHeader("Connection", "close");
|
||||
server.send(200, _encoding_json, "{\"status\":\"ERROR\",\"desc\":\"Updating Application: \"}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue