fix: add reboot endpoint and test documentation
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user