diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-05-28 20:13:07 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-06-13 15:34:52 +0200 |
commit | 218d0add36f873e7cdfdd32608883ea431eb2af9 (patch) | |
tree | 455394dcafd73e37272ae89177c34466c16de6ba /core/routes.php | |
parent | a7fbd91e53be5f4fd68f035c999eaa3f187b9d3d (diff) | |
download | nextcloud-server-218d0add36f873e7cdfdd32608883ea431eb2af9.tar.gz nextcloud-server-218d0add36f873e7cdfdd32608883ea431eb2af9.zip |
Changes according to review
Diffstat (limited to 'core/routes.php')
-rw-r--r-- | core/routes.php | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/core/routes.php b/core/routes.php index 3ee5fcaa622..0a67585e0b1 100644 --- a/core/routes.php +++ b/core/routes.php @@ -6,45 +6,16 @@ * See the COPYING-README file. */ -use \OCP\AppFramework\App; -use OC\Core\LostPassword\Controller\LostController; -use OC\Core\LostPassword\Controller\AjaxController; - -class Application extends App { - public function __construct(array $urlParams=array()){ - parent::__construct('core', $urlParams); - - $container = $this->getContainer(); - - /** - * Controllers - */ - $container->registerService('LostController', function($c) { - return new LostController( - $c->query('AppName'), - $c->query('ServerContainer')->getRequest(), - $c->query('ServerContainer')->getURLGenerator() - ); - }); - $container->registerService('AjaxController', function($c) { - return new AjaxController( - $c->query('AppName'), - $c->query('ServerContainer')->getRequest(), - $c->query('ServerContainer')->getURLGenerator() - ); - }); - } -} +use OC\Core\LostPassword\Application; $application = new Application(); $application->registerRoutes($this, array('routes' => array( - array('name' => 'ajax#lost', 'url' => '/core/ajax/password/lost', 'verb' => 'POST'), - array('name' => 'ajax#reset', 'url' => '/core/ajax/password/reset/{token}/{user}', 'verb' => 'POST'), - array('name' => 'lost#reset', 'url' => '/lostpassword/reset/{token}/{user}', 'verb' => 'GET'), + array('name' => 'lost#lost', 'url' => '/core/ajax/password/lost', 'verb' => 'POST'), + array('name' => 'lost#reset', 'url' => '/lostpassword/reset/{token}/{uid}', 'verb' => 'GET'), + array('name' => 'lost#resetPassword', 'url' => '/core/ajax/password/reset/{token}/{user}', 'verb' => 'POST'), ) )); - // Post installation check /** @var $this OCP\Route\IRouter */ |