Skip to content

Commit

Permalink
Improve username route matching everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
leepeuker committed Aug 18, 2022
1 parent 06e3677 commit 9c442d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions settings/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
);
$routeCollector->addRoute(
'GET',
'/{username:.+}/dashboard',
'/{username:[a-zA-Z0-9]+}/dashboard',
[\Movary\HttpController\DashboardController::class, 'render']
);
$routeCollector->addRoute(
Expand Down Expand Up @@ -69,12 +69,12 @@
);
$routeCollector->addRoute(
'GET',
'/{username:.+}/most-watched-actors',
'/{username:[a-zA-Z0-9]+}/most-watched-actors',
[\Movary\HttpController\MostWatchedActorsController::class, 'renderPage']
);
$routeCollector->addRoute(
'GET',
'/{username:.+}/most-watched-directors',
'/{username:[a-zA-Z0-9]+}/most-watched-directors',
[\Movary\HttpController\MostWatchedDirectorsController::class, 'renderPage']
);
$routeCollector->addRoute(
Expand Down Expand Up @@ -104,7 +104,7 @@
);
$routeCollector->addRoute(
'GET',
'/{username:.+}/movie/{id:\d+}',
'/{username:[a-zA-Z0-9]+}/movie/{id:\d+}',
[\Movary\HttpController\MovieController::class, 'renderPage']
);
$routeCollector->addRoute(
Expand All @@ -119,7 +119,7 @@
);
$routeCollector->addRoute(
'GET',
'/{username:.+}/person/{id:\d+}',
'/{username:[a-zA-Z0-9]+}/person/{id:\d+}',
[\Movary\HttpController\PersonController::class, 'renderPage']
);
$routeCollector->addRoute(
Expand Down

0 comments on commit 9c442d1

Please sign in to comment.