From 6e41c55d69266145cad88377bd7c9cd5dea2f79d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Fri, 15 Nov 2019 00:59:33 +0100 Subject: [PATCH 1/1] Fix controller naming Add methods Add requirements --- .../master/config/routes/rapsys_user.yaml | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/rapsys/userbundle/master/config/routes/rapsys_user.yaml b/rapsys/userbundle/master/config/routes/rapsys_user.yaml index 3a36e42..26a7cad 100644 --- a/rapsys/userbundle/master/config/routes/rapsys_user.yaml +++ b/rapsys/userbundle/master/config/routes/rapsys_user.yaml @@ -1,21 +1,30 @@ rapsys_user_login: - path: /login - defaults: { _controller: Rapsys\UserBundle\Controller\DefaultController::login } + path: /login + controller: Rapsys\UserBundle\Controller\DefaultController::login + methods: GET|POST rapsys_user_recover: - path: /recover - defaults: { _controller: Rapsys\UserBundle\Controller\DefaultController::recover } + path: /recover + controller: Rapsys\UserBundle\Controller\DefaultController::recover + methods: GET|POST rapsys_user_recover_mail: path: /recover/{recipient}/{hash} - defaults: { _controller: Rapsys\UserBundle\Controller\DefaultController::recoverMail } + controller: Rapsys\UserBundle\Controller\DefaultController::recoverMail + requirements: + recipient: '[a-zA-Z0-9=_-]+' + hash: '[a-zA-Z0-9=_-]+' + methods: GET|POST rapsys_user_register: - path: /register - defaults: { _controller: Rapsys\UserBundle\Controller\DefaultController::register } + path: /register + controller: Rapsys\UserBundle\Controller\DefaultController::register + methods: GET|POST rapsys_user_logout: - path: /logout + path: /logout + methods: GET rapsys_user_homepage: - path: / + path: / + methods: GET -- 2.41.1