changeset 710:3e9f0070c33e

Password reset endpoints do not need impersonated db connections. Make that clear to the JSONHandler. It works without it but this way it's more explicit.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 21 Sep 2018 12:48:39 +0200
parents 35fd15711e9e
children ed2dd10a94b5
files pkg/controllers/routes.go
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Fri Sep 21 12:26:39 2018 +0200
+++ b/pkg/controllers/routes.go	Fri Sep 21 12:48:39 2018 +0200
@@ -47,10 +47,12 @@
 	api.Handle("/users/passwordreset", &JSONHandler{
 		Input:  func() interface{} { return new(models.PWResetUser) },
 		Handle: passwordResetRequest,
+		NoConn: true,
 	}).Methods(http.MethodPost)
 
 	api.Handle("/users/passwordreset/{hash}", &JSONHandler{
 		Handle: passwordReset,
+		NoConn: true,
 	}).Methods(http.MethodGet)
 
 	// External proxies.