From 7bc62868f7e9e0d5e5afb21eb6efbed7d2539c9f Mon Sep 17 00:00:00 2001 From: rainydaysavings Date: Fri, 28 Aug 2020 07:19:12 +0100 Subject: [PATCH] [ROUTE] Home timeline route url now shows accordingly as the user nickname --- src/Routes/Main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Routes/Main.php b/src/Routes/Main.php index 4cf8b6ab5c..cbaa2db082 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -35,6 +35,7 @@ namespace App\Routes; use App\Controller as C; use App\Core\Router\RouteLoader; +use App\Util\Nickname; use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; abstract class Main @@ -47,7 +48,7 @@ abstract class Main $r->connect('root', '/', RedirectController::class, ['defaults' => ['route' => 'main_all']]); $r->connect('main_all', '/main/all', [C\NetworkPublic::class, 'public']); - $r->connect('home_all', '/user_here/all', [C\NetworkPublic::class, 'home']); + $r->connect('home_all', '/{nickname<' . Nickname::DISPLAY_FMT . '>}/all', [C\NetworkPublic::class, 'home']); $r->connect('panel', '/panel', [C\AdminPanel::class, 'site']); $r->connect('panel_site', '/panel/site', [C\AdminPanel::class, 'site']);