File tree Expand file tree Collapse file tree
apps/provisioning_api/lib/Controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 */
99namespace OCA \Provisioning_API \Controller ;
1010
11+ use OC \Installer ;
1112use OC_App ;
1213use OCP \App \AppPathNotFoundException ;
1314use OCP \App \IAppManager ;
1718use OCP \AppFramework \OCS \OCSException ;
1819use OCP \AppFramework \OCSController ;
1920use OCP \IRequest ;
21+ use OCP \Server ;
2022
2123class AppsController extends OCSController {
2224 public function __construct (
@@ -108,6 +110,8 @@ public function getAppInfo(string $app): DataResponse {
108110 public function enable (string $ app ): DataResponse {
109111 try {
110112 $ app = $ this ->verifyAppId ($ app );
113+ $ installer = Server::get (Installer::class);
114+ $ installer ->installApp ($ app );
111115 $ this ->appManager ->enableApp ($ app );
112116 } catch (\InvalidArgumentException $ e ) {
113117 throw new OCSException ($ e ->getMessage (), OCSController::RESPOND_UNAUTHORISED );
You can’t perform that action at this time.
0 commit comments