Fixed script error associated with unlinking remotes.

This commit is contained in:
Robert Strouse 2023-07-23 08:11:24 -07:00
parent 6711162c55
commit 5c06f2a6d4
5 changed files with 10 additions and 5 deletions

View file

@ -1394,6 +1394,7 @@ void Web::begin() {
});
server.on("/unlinkRemote", []() {
webServer.sendCORSHeaders();
if(server.method() == HTTP_OPTIONS) { server.send(200, "OK"); return; }
HTTPMethod method = server.method();
if (method == HTTP_PUT || method == HTTP_POST) {
// We are updating an existing shade by adding a linked remote.