mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:10:10 +00:00
Unified JSON exit
This commit is contained in:
parent
344e12c4fc
commit
d15023fe4b
21 changed files with 61 additions and 80 deletions
|
@ -26,6 +26,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -78,9 +79,7 @@ class Statistics extends BaseModule
|
|||
'services' => $services,
|
||||
], $services);
|
||||
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode($statistics, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
$this->logger->debug("statistics.", ['statistics' => $statistics]);
|
||||
exit();
|
||||
System::jsonExit($statistics);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue