diff options
Diffstat (limited to 'lib/private/AppFramework/Routing/RouteConfig.php')
-rw-r--r-- | lib/private/AppFramework/Routing/RouteConfig.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php index 70208725f46..e2675a3c847 100644 --- a/lib/private/AppFramework/Routing/RouteConfig.php +++ b/lib/private/AppFramework/Routing/RouteConfig.php @@ -231,9 +231,15 @@ class RouteConfig { $routeName = $this->appName . '.' . strtolower($resource) . '.' . strtolower($method); - $this->router->create($routeName, $url)->method($verb)->action( + $route = $this->router->create($routeName, $url)->method($verb)->action( new RouteActionHandler($this->container, $controllerName, $actionName) ); + + if (!$collectionAction) { + $route->requirements([ + 'id' => '[^?]*' + ]); + } } } } |