Merge pull request #4138 from nextcloud/resources_match_fullid

Match slashes in ../{id} resource routes
This commit is contained in:
Morris Jobke 2017-04-04 15:52:53 -05:00 committed by GitHub
commit fa4107893d
1 changed files with 7 additions and 1 deletions

View File

@ -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' => '[^?]*'
]);
}
}
}
}