diff controllers/routes.go @ 239:713234a04a87

Renamed JSONHandler.Process to JSONHandler.Handler as it sounds more symmetrical.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 26 Jul 2018 17:15:22 +0200
parents 3771788d3dae
children 9012e4045da4
line wrap: on
line diff
--- a/controllers/routes.go	Thu Jul 26 17:09:43 2018 +0200
+++ b/controllers/routes.go	Thu Jul 26 17:15:22 2018 +0200
@@ -15,13 +15,13 @@
 	sysAdmin := auth.EnsureRole("sys_admin")
 
 	api.Handle("/users", sysAdmin(&JSONHandler{
-		Input:   func() interface{} { return new(User) },
-		Process: createUser,
+		Input:  func() interface{} { return new(User) },
+		Handle: createUser,
 	})).Methods(http.MethodPost)
 
 	api.Handle("/users/{user}", sysAdmin(&JSONHandler{
-		Input:   func() interface{} { return new(User) },
-		Process: updateUser,
+		Input:  func() interface{} { return new(User) },
+		Handle: updateUser,
 	})).Methods(http.MethodPut)
 
 	api.HandleFunc("/login", login).