mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 06:46:10 +02:00
Merge branch 'development03' into hms
This commit is contained in:
commit
997bfe41e7
11 changed files with 254 additions and 147 deletions
|
@ -80,6 +80,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);
|
||||
|
@ -265,6 +266,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