]> Raphaël G. Git Repositories - recipe/commitdiff
Fix controller naming
authorRaphaël Gertz <git@rapsys.eu>
Thu, 14 Nov 2019 23:59:33 +0000 (00:59 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Thu, 14 Nov 2019 23:59:33 +0000 (00:59 +0100)
Add methods
Add requirements

rapsys/userbundle/master/config/routes/rapsys_user.yaml

index 3a36e42b45b539d1e5fa1f56d840aa3dcdb63156..26a7cad2a402ad06a54c758764ce5ba01341320b 100644 (file)
@@ -1,21 +1,30 @@
 rapsys_user_login:
 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:
 
 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}
 
 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:
 
 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:
 
 rapsys_user_logout:
-    path:     /logout
+    path: /logout
+    methods: GET
 
 rapsys_user_homepage:
 
 rapsys_user_homepage:
-    path:     /
+    path: /
+    methods: GET