diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-26 10:52:06 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-26 11:36:09 +0200 |
commit | 2fdda01b4b75cccc0a7d7c541612121c82f64e7f (patch) | |
tree | 472e8aa1ac53fef8f3ec0359ed4d0dbf4d6279a9 /apps/files_sharing/appinfo | |
parent | ad4cab130eda568cdd1e5344796140d853655740 (diff) | |
download | nextcloud-server-2fdda01b4b75cccc0a7d7c541612121c82f64e7f.tar.gz nextcloud-server-2fdda01b4b75cccc0a7d7c541612121c82f64e7f.zip |
Sharee API to AppFramework
* Move to OCSController
* Move to Controller folder
* Use automatic DI
* Use function parameters
* Updated tests
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index ee7ea55d506..de6967c7d63 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -69,6 +69,14 @@ $application->registerRoutes($this, [ 'url' => '/api/v1/shares/{id}', 'verb' => 'DELETE', ], + /* + * OCS Sharee API + */ + [ + 'name' => 'ShareesAPI#search', + 'url' => '/api/v1/sharees', + 'verb' => 'GET', + ], ], ]); @@ -118,20 +126,3 @@ API::register('delete', '/apps/files_sharing/api/v1/remote_shares/{id}', array('\OCA\Files_Sharing\API\Remote', 'unshare'), 'files_sharing'); - - -$sharees = new \OCA\Files_Sharing\API\Sharees(\OC::$server->getGroupManager(), - \OC::$server->getUserManager(), - \OC::$server->getContactsManager(), - \OC::$server->getConfig(), - \OC::$server->getUserSession(), - \OC::$server->getURLGenerator(), - \OC::$server->getRequest(), - \OC::$server->getLogger(), - \OC::$server->getShareManager()); - -API::register('get', - '/apps/files_sharing/api/v1/sharees', - [$sharees, 'search'], - 'files_sharing', API::USER_AUTH); - |