Skip to content
Snippets Groups Projects
Commit 180bd69d authored by Bart Visscher's avatar Bart Visscher
Browse files

Fix OC_API::register

parent 95d3b83a
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,10 @@ class OC_API {
*/
public static function register($method, $url, $action, $app){
$name = strtolower($method).$url;
$name = str_replace(array('/', '{', '}'), '_', $name);
if(!isset(self::$actions[$name])){
OC_Router::create($name, $url.'.{format}')
OC::$router->create($name, $url.'.{_format}')
->defaults(array('_format'=>'xml'))
->action('OC_API', 'call');
self::$actions[$name] = array();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment