Add api.php?updatecheck endpoint

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-06-07 20:20:16 +02:00
parent cca6e414b8
commit f35f663be9
+12
View File
@@ -73,6 +73,18 @@ elseif (isset($_GET['disable']) && $auth)
} }
$data = array_merge($data, array("status" => "disabled")); $data = array_merge($data, array("status" => "disabled"));
} }
elseif (isset($_GET['updatecheck']))
{
// Determine if updates are available for Pi-hole
// using the same script that we use for the footer
// on the dashboard (update notifications are
// suppressed if on development branches)
require "scripts/pi-hole/php/update_checker.php";
$updates = array("core_update" => $core_update,
"web_update" => $web_update,
"FTL_update" => $FTL_update);
$data = array_merge($data, $updates);
}
// Other API functions // Other API functions
require("api_FTL.php"); require("api_FTL.php");