mirror of
https://github.com/friendica/friendica
synced 2025-04-20 17: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
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Module\WellKnown;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +52,6 @@ class NodeInfo extends BaseModule
|
|||
]
|
||||
];
|
||||
|
||||
header('Content-type: application/json; charset=utf-8');
|
||||
echo json_encode($nodeinfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
System::jsonExit($nodeinfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Module\WellKnown;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Search;
|
||||
use Friendica\Protocol\Relay;
|
||||
|
@ -76,8 +77,6 @@ class XSocialRelay extends BaseModule
|
|||
$relay['protocols']['diaspora'] = ['receive' => DI::baseUrl()->get() . '/receive/public'];
|
||||
}
|
||||
|
||||
header('Content-type: application/json; charset=utf-8');
|
||||
echo json_encode($relay, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
System::jsonExit($relay);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue