Mercurial > gemma
diff pkg/controllers/routes.go @ 3119:ad5a00ccd276
Display Available Fairway Depths: More controller code.
The steppings (monthly, quarterly, yearly) through the measurements are still missing.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Apr 2019 11:36:00 +0200 |
parents | 4dcbf9e9013c |
children | c8ded555c2a8 |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Sun Apr 28 22:26:48 2019 +0200 +++ b/pkg/controllers/routes.go Mon Apr 29 11:36:00 2019 +0200 @@ -307,9 +307,8 @@ Handle: bottleneckAvailabilty, })).Methods(http.MethodGet) - api.Handle("/data/bottleneck/fairway-depth/{objnam}", any(&JSONHandler{ - Handle: bottleneckAvailableFairwayDepth, - })).Methods(http.MethodGet) + api.Handle("/data/bottleneck/fairway-depth/{objnam}", any( + middleware.DBConn(http.HandlerFunc(bottleneckAvailableFairwayDepth)))).Methods(http.MethodGet) api.Handle("/data/waterlevels/{gauge}", any( middleware.DBConn(http.HandlerFunc(waterlevels)))).Methods(http.MethodGet)