diff --git a/src/main.cpp b/src/main.cpp index e57c155..39356c7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -90,12 +90,15 @@ void setup() config.clear(); config.end(); // respond with default config - onGetConfig(config, request); }); + onGetConfig(config, request); + + ESP.restart(); }); server.onRequestBody([](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total) { if (request->url() == "/config" && request->method() == HTTP_PUT) { onPutConfig(request, data, len, index, total); + ESP.restart(); } }); delay(1000);