Merge pull request #4138 from nextcloud/resources_match_fullid
Match slashes in ../{id} resource routes
This commit is contained in:
commit
fa4107893d
1 changed files with 7 additions and 1 deletions
|
@ -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' => '[^?]*'
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue