changeset 4790:6f3730196ebb

endpoint routing: get rid of unnecessary local variable.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 25 Oct 2019 11:13:31 +0200
parents 9e077ca97505
children 1fef4679b07a
files pkg/controllers/routes.go
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Wed Oct 23 16:41:43 2019 +0200
+++ b/pkg/controllers/routes.go	Fri Oct 25 11:13:31 2019 +0200
@@ -285,12 +285,10 @@
 		})).Methods(http.MethodGet)
 
 	// Import queue
-	lsImports := waterwayAdmin(&mw.JSONHandler{
+
+	api.Handle("/imports", waterwayAdmin(&mw.JSONHandler{
 		Handle: listImports,
-	})
-
-	api.Handle("/imports", lsImports).
-		Methods(http.MethodGet)
+	})).Methods(http.MethodGet)
 
 	api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&mw.JSONHandler{
 		Handle: importLogs,