mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
Unbound: minor cleanup in /api/unbound/diagnostics/stats endpoint
This commit is contained in:
parent
fe3a49c2d2
commit
b109234dfa
@ -46,10 +46,10 @@ class DiagnosticsController extends ApiControllerBase
|
||||
{
|
||||
$ret['status'] = "failed";
|
||||
$backend = new Backend();
|
||||
$result = trim($backend->configdRun('unbound stats'));
|
||||
if ($result != "null") {
|
||||
$result = json_decode($backend->configdRun('unbound stats'), true);
|
||||
if ($result != null) {
|
||||
$ret['status'] = "ok";
|
||||
$ret['data'] = json_decode($result);
|
||||
$ret['data'] = $result;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user