From 230ceeab29eaf4c87a6085edc1355de94b31fc01 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 13 Jun 2020 13:17:19 -0400 Subject: [PATCH] Add names to routes we need to get URLs for --- src/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes.php b/src/routes.php index b703b5e..a3ed395 100644 --- a/src/routes.php +++ b/src/routes.php @@ -10,7 +10,7 @@ use Slim\Http\Response; */ $app->get('/servers/surprise', \Friendica\Directory\Routes\Http\Surprise::class); -$app->get('/servers', \Friendica\Directory\Routes\Web\Servers::class); +$app->get('/servers', \Friendica\Directory\Routes\Web\Servers::class)->setName('servers'); $app->get('/search[/{account_type}]', function (Request $request, Response $response, $args) { if ($request->getAttribute('negotiation')->getMediaType() == 'application/json') { @@ -24,7 +24,7 @@ $app->get('/search[/{account_type}]', function (Request $request, Response $resp $app->post('/msearch', \Friendica\Directory\Routes\Http\MatchSearch::class); -$app->get('/stats', \Friendica\Directory\Routes\Web\Statistics::class); +$app->get('/stats', \Friendica\Directory\Routes\Web\Statistics::class)->setName('stats'); $app->get('/submit', \Friendica\Directory\Routes\Http\Submit::class);