diff options
author | Joas Schilling <coding@schilljs.com> | 2017-03-20 10:30:46 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-03-20 10:45:27 +0100 |
commit | 3abe86dade02a27c1e26433698ac0702d06b6704 (patch) | |
tree | 09d720ea2565d66f543c74d36bf0f42378f85b9b /apps/provisioning_api | |
parent | 591e75df5c3acf51e6968f20b1856481ee56f4de (diff) | |
download | nextcloud-server-3abe86dade02a27c1e26433698ac0702d06b6704.tar.gz nextcloud-server-3abe86dade02a27c1e26433698ac0702d06b6704.zip |
Fix provisioning API call
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AppsController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/AppsController.php b/apps/provisioning_api/lib/Controller/AppsController.php index e384d5af907..1165c7b8564 100644 --- a/apps/provisioning_api/lib/Controller/AppsController.php +++ b/apps/provisioning_api/lib/Controller/AppsController.php @@ -26,7 +26,9 @@ namespace OCA\Provisioning_API\Controller; use \OC_App; +use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCSController; @@ -99,9 +101,14 @@ class AppsController extends OCSController { * @PasswordConfirmationRequired * @param string $app * @return DataResponse + * @throws OCSException */ public function enable($app) { - $this->appManager->enableApp($app); + try { + $this->appManager->enableApp($app); + } catch (AppPathNotFoundException $e) { + throw new OCSException('The request app was not found', \OCP\API::RESPOND_NOT_FOUND); + } return new DataResponse(); } |