diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-25 17:59:50 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-25 17:59:50 +0200 |
commit | 5a0d476ab15f4b6a42c713aa503c18a6148bb24b (patch) | |
tree | 5b6bb95b94a2bbedda12794316fc596248a6caf1 /lib/ocs.php | |
parent | d579defc668ff3354771c6bc346415d5ef6e2d73 (diff) | |
download | nextcloud-server-5a0d476ab15f4b6a42c713aa503c18a6148bb24b.tar.gz nextcloud-server-5a0d476ab15f4b6a42c713aa503c18a6148bb24b.zip |
Convert new actions
Diffstat (limited to 'lib/ocs.php')
-rw-r--r-- | lib/ocs.php | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/lib/ocs.php b/lib/ocs.php index 570f5ac3e59..61df38d2dbb 100644 --- a/lib/ocs.php +++ b/lib/ocs.php @@ -177,8 +177,14 @@ class OC_OCS { // CLOUD // systemWebApps - }elseif(($method=='get') and ($ex[$paracount-5] == 'v1.php') and ($ex[$paracount-4]=='cloud') and ($ex[$paracount-3] == 'system') and ($ex[$paracount-2] == 'webapps')){ - OC_OCS::systemwebapps($format); + $router->create('system_webapps', + '/cloud/system/webapps.{format}') + ->defaults(array('format' => $format)) + ->action(function ($parameters) { + $format = $parameters['format']; + OC_OCS::systemwebapps($format); + }) + ->requirements(array('format'=>'xml|json')); // quotaget $router->create('quota_get', @@ -204,14 +210,26 @@ class OC_OCS { ->requirements(array('format'=>'xml|json')); // keygetpublic - }elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'publickey')){ - $user=$ex[$paracount-3]; - OC_OCS::publicKeyGet($format,$user); + $router->create('keygetpublic', + '/cloud/user/{user}/publickey.{format}') + ->defaults(array('format' => $format)) + ->action(function ($parameters) { + $format = $parameters['format']; + $user = $parameters['user']; + OC_OCS::publicKeyGet($format,$user); + }) + ->requirements(array('format'=>'xml|json')); // keygetprivate - }elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'privatekey')){ - $user=$ex[$paracount-3]; - OC_OCS::privateKeyGet($format,$user); + $router->create('keygetpublic', + '/cloud/user/{user}/privatekey.{format}') + ->defaults(array('format' => $format)) + ->action(function ($parameters) { + $format = $parameters['format']; + $user = $parameters['user']; + OC_OCS::privateKeyGet($format,$user); + }) + ->requirements(array('format'=>'xml|json')); // add more calls here |