mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:50:11 +00:00
Unified JSON exit
This commit is contained in:
parent
344e12c4fc
commit
d15023fe4b
21 changed files with 61 additions and 80 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Events;
|
||||
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Event;
|
||||
|
@ -94,9 +95,7 @@ class Json extends \Friendica\BaseModule
|
|||
$events = self::map($events);
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($events);
|
||||
exit();
|
||||
System::jsonExit($events);
|
||||
}
|
||||
|
||||
private static function map(array $events): array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue