mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 14:56:11 +02:00
parent
53d02df854
commit
5a1a600327
5 changed files with 20 additions and 5 deletions
|
@ -79,6 +79,7 @@ class RestApi {
|
|||
String path = request->url().substring(5);
|
||||
if(path == "html/system") getHtmlSystem(root);
|
||||
else if(path == "html/logout") getHtmlLogout(root);
|
||||
else if(path == "html/reboot") getHtmlReboot(root);
|
||||
else if(path == "html/save") getHtmlSave(root);
|
||||
else if(path == "system") getSysInfo(root);
|
||||
else if(path == "generic") getGeneric(root);
|
||||
|
@ -264,6 +265,13 @@ class RestApi {
|
|||
obj[F("html")] = F("succesfully logged out");
|
||||
}
|
||||
|
||||
void getHtmlReboot(JsonObject obj) {
|
||||
getGeneric(obj.createNestedObject(F("generic")));
|
||||
obj[F("refresh")] = 20;
|
||||
obj[F("refresh_url")] = "/";
|
||||
obj[F("html")] = F("rebooting ...");
|
||||
}
|
||||
|
||||
void getHtmlSave(JsonObject obj) {
|
||||
getGeneric(obj.createNestedObject(F("generic")));
|
||||
obj["pending"] = (bool)mApp->getSavePending();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue