Fix provisioning API call
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
591e75df5c
commit
3abe86dade
|
@ -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) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue