<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
namespace Friendica\Module\WellKnown;
use Friendica\BaseModule;
+use Friendica\Core\System;
use Friendica\DI;
/**
*/
class NodeInfo extends BaseModule
{
- public static function rawContent(array $parameters = [])
+ protected function rawContent(array $request = [])
{
self::printWellKnown();
}
$nodeinfo = [
'links' => [
['rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
- 'href' => DI::baseUrl()->get() . '/nodeinfo/1.0'],
+ 'href' => DI::baseUrl() . '/nodeinfo/1.0'],
['rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0',
- 'href' => DI::baseUrl()->get() . '/nodeinfo/2.0'],
+ 'href' => DI::baseUrl() . '/nodeinfo/2.0'],
]
];
- header('Content-type: application/json; charset=utf-8');
- echo json_encode($nodeinfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
- exit;
+ System::jsonExit($nodeinfo);
}
}