diff options
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 */ |