diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-26 14:20:35 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-26 14:20:35 +0200 |
commit | 2662c4c61b5f8dcb274a1a205de1c2b0d8980b1c (patch) | |
tree | cca079637128f9d5d7050dcb1ce9518b6da6f27b /lib | |
parent | 5496ca234bf5537ecf44311bcd7c50502c1982e2 (diff) | |
download | nextcloud-server-2662c4c61b5f8dcb274a1a205de1c2b0d8980b1c.tar.gz nextcloud-server-2662c4c61b5f8dcb274a1a205de1c2b0d8980b1c.zip |
use id instead of resourceId
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appframework/routing/routeconfig.php | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php index 634bc888bdb..5b4d411a355 100644 --- a/lib/private/appframework/routing/routeconfig.php +++ b/lib/private/appframework/routing/routeconfig.php @@ -122,14 +122,13 @@ class RouteConfig { foreach ($resources as $resource => $config) { // the url parameter used as id to the resource - $resourceId = $this->buildResourceId($resource); foreach($actions as $action) { $url = $config['url']; $method = $action['name']; $verb = isset($action['verb']) ? strtoupper($action['verb']) : 'GET'; $collectionAction = isset($action['on-collection']) ? $action['on-collection'] : false; if (!$collectionAction) { - $url = $url . '/' . $resourceId; + $url = $url . '/{id}'; } if (isset($action['url-postfix'])) { $url = $url . '/' . $action['url-postfix']; @@ -169,15 +168,6 @@ class RouteConfig { } /** - * Generates the id used in the url part o the route url - * @param string $resource - * @return string - */ - private function buildResourceId($resource) { - return '{' . $this->underScoreToCamelCase($resource) . 'Id}'; - } - - /** * Underscored strings are converted to camel case strings * @param string $str * @return string |