fix: add reboot endpoint and test documentation

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-03 11:01:04 -04:00
parent 18b2518c33
commit 8fb9d75229
2 changed files with 51 additions and 0 deletions

View File

@@ -135,6 +135,13 @@ void AppWebServer::setupAPIRoutes() {
delay(100);
_power->enterDeepSleep();
});
_server.on("/api/action/reboot", HTTP_POST,
[](AsyncWebServerRequest* req) {
req->send(200, "application/json", "{\"ok\":true,\"msg\":\"Rebooting...\"}");
delay(500);
ESP.restart();
});
}
void AppWebServer::setupStaticFiles() {