diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-15 11:58:44 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-14 16:26:59 +0100 |
commit | 988c85d2922a03346389e3656dc71dfee514e645 (patch) | |
tree | 9be0d1674dd7e780c70c77a987c4a810145078ab /core/routes.php | |
parent | 0f3c5d8541dcb41eebd00f22864a0a646c11124f (diff) | |
download | nextcloud-server-988c85d2922a03346389e3656dc71dfee514e645.tar.gz nextcloud-server-988c85d2922a03346389e3656dc71dfee514e645.zip |
Refactor file sharing public link handling
fixes download issue introduced by #10755
Conflicts:
apps/files_sharing/public.php
Diffstat (limited to 'core/routes.php')
-rw-r--r-- | core/routes.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/core/routes.php b/core/routes.php index 92545d0322e..ced70898f50 100644 --- a/core/routes.php +++ b/core/routes.php @@ -95,9 +95,22 @@ $this->create('core_avatar_post_cropped', '/avatar/cropped') ->action('OC\Core\Avatar\Controller', 'postCroppedAvatar'); // Sharing routes -$this->create('core_share_show_share', '/s/{token}') - ->get() - ->action('OC\Core\Share\Controller', 'showShare'); +$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) { + $app = new \OCA\Files_Sharing\Application($urlParams); + $app->dispatch('ShareController', 'showShare'); +}); +$this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) { + $app = new \OCA\Files_Sharing\Application($urlParams); + $app->dispatch('ShareController', 'authenticate'); +}); +$this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) { + $app = new \OCA\Files_Sharing\Application($urlParams); + $app->dispatch('ShareController', 'showAuthenticate'); +}); +$this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) { + $app = new \OCA\Files_Sharing\Application($urlParams); + $app->dispatch('ShareController', 'downloadShare'); +}); // used for heartbeat $this->create('heartbeat', '/heartbeat')->action(function(){ |