Throw a nice HintException when the apps are missing
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
bc11c7ba97
commit
4174d75f86
|
@ -84,26 +84,46 @@ $this->create('files.viewcontroller.showFile', '/f/{fileid}')->action(function($
|
||||||
|
|
||||||
// Call routes
|
// Call routes
|
||||||
$this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(function($urlParams) {
|
$this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(function($urlParams) {
|
||||||
|
if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
|
||||||
$app = new \OCA\Spreed\AppInfo\Application($urlParams);
|
$app = new \OCA\Spreed\AppInfo\Application($urlParams);
|
||||||
$app->dispatch('PageController', 'index');
|
$app->dispatch('PageController', 'index');
|
||||||
|
} else {
|
||||||
|
throw new \OC\HintException('App spreed is not enabled');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Sharing routes
|
// Sharing routes
|
||||||
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
|
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
|
||||||
|
if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
|
||||||
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
||||||
$app->dispatch('ShareController', 'showShare');
|
$app->dispatch('ShareController', 'showShare');
|
||||||
|
} else {
|
||||||
|
throw new \OC\HintException('App file sharing is not enabled');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
|
$this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
|
||||||
|
if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
|
||||||
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
||||||
$app->dispatch('ShareController', 'authenticate');
|
$app->dispatch('ShareController', 'authenticate');
|
||||||
|
} else {
|
||||||
|
throw new \OC\HintException('App file sharing is not enabled');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
|
$this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
|
||||||
|
if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
|
||||||
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
||||||
$app->dispatch('ShareController', 'showAuthenticate');
|
$app->dispatch('ShareController', 'showAuthenticate');
|
||||||
|
} else {
|
||||||
|
throw new \OC\HintException('App file sharing is not enabled');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
|
$this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
|
||||||
|
if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
|
||||||
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
|
||||||
$app->dispatch('ShareController', 'downloadShare');
|
$app->dispatch('ShareController', 'downloadShare');
|
||||||
|
} else {
|
||||||
|
throw new \OC\HintException('App file sharing is not enabled');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// used for heartbeat
|
// used for heartbeat
|
||||||
|
|
Loading…
Reference in New Issue