Adding to router

This commit is contained in:
Philipp Holzer 2019-04-30 22:36:28 +02:00
parent 007d0459be
commit e7f8d8c3b6
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
3 changed files with 5 additions and 3 deletions

View file

@ -3,7 +3,7 @@
use Friendica\App; use Friendica\App;
use Friendica\Core\Config; use Friendica\Core\Config;
use Friendica\Core\System; use Friendica\Core\System;
use Friendica\Module\Hostxrd; use Friendica\Module\HostMeta;
use Friendica\Module\Nodeinfo; use Friendica\Module\Nodeinfo;
require_once 'mod/xrd.php'; require_once 'mod/xrd.php';
@ -13,7 +13,7 @@ function _well_known_init(App $a)
if ($a->argc > 1) { if ($a->argc > 1) {
switch ($a->argv[1]) { switch ($a->argv[1]) {
case "host-meta": case "host-meta":
Hostxrd::printHostMeta(); HostMeta::printHostMeta();
break; break;
case "x-social-relay": case "x-social-relay":
wk_social_relay(); wk_social_relay();

View file

@ -42,6 +42,8 @@ class Router
{ {
$this->routeCollector->addRoute(['GET', 'POST'], '/itemsource[/{guid}]', Module\Itemsource::class); $this->routeCollector->addRoute(['GET', 'POST'], '/itemsource[/{guid}]', Module\Itemsource::class);
$this->routeCollector->addRoute(['GET'], '/amcd', Module\AccountManagementControlDocument::class); $this->routeCollector->addRoute(['GET'], '/amcd', Module\AccountManagementControlDocument::class);
$this->routeCollector->addRoute(['GET'], '/host-meta', Module\HostMeta::class);
$this->routeCollector->addRoute(['GET'], '/hostxrd', Module\HostMeta::class);
} }
public function __construct(RouteCollector $routeCollector = null) public function __construct(RouteCollector $routeCollector = null)

View file

@ -10,7 +10,7 @@ use Friendica\Util\Crypto;
/** /**
* Prints the host-meta text * Prints the host-meta text
*/ */
class Hostxrd extends BaseModule class HostMeta extends BaseModule
{ {
public static function rawContent() public static function rawContent()
{ {