diff pkg/controllers/routes.go @ 3245:60f25cbe77fb

Added API stubs from fairway availabilty for stretches and sections.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 13 May 2019 09:15:20 +0200
parents 4c254651d80b
children 2b5c22f6bb1f
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Fri May 10 17:58:49 2019 +0200
+++ b/pkg/controllers/routes.go	Mon May 13 09:15:20 2019 +0200
@@ -314,6 +314,13 @@
 		Handle: bottleneckAvailabilty,
 	})).Methods(http.MethodGet)
 
+	api.Handle("/data/{kind:stretch|section}/availability/{objnam}", any(&JSONHandler{
+		Handle: stretchAvailabilty,
+	})).Methods(http.MethodGet)
+
+	api.Handle("/data/{kind:stretch|section}/fairway-depth/{objnam}", any(
+		middleware.DBConn(http.HandlerFunc(stretchAvailableFairwayDepth)))).Methods(http.MethodGet)
+
 	api.Handle("/data/bottleneck/fairway-depth/{objnam}", any(
 		middleware.DBConn(http.HandlerFunc(bottleneckAvailableFairwayDepth)))).Methods(http.MethodGet)