diff pkg/controllers/routes.go @ 5218:7dbb7cc6dbfa new-fwa

Remove old routes for availabilties.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 May 2020 20:10:15 +0200
parents 3c748b2b4de6
children 6ba7e6ac0882
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Mon May 11 19:52:25 2020 +0200
+++ b/pkg/controllers/routes.go	Mon May 11 20:10:15 2020 +0200
@@ -324,24 +324,12 @@
 
 	// Handler to serve data to the client.
 
-	api.Handle("/data/{kind:stretch|section|bottleneck}/fairway/{name:.+}", any(
+	api.Handle("/data/{kind:stretch|section|bottleneck}/{type:availability|fairway}/{name:.+}", any(
 		mw.DBConn(http.HandlerFunc(fairwayAvailability)))).Methods(http.MethodGet)
 
 	api.Handle("/data/stretch/shape/{name:.+}", any(
 		mw.DBConn(http.HandlerFunc(stretchShapeDownload)))).Methods(http.MethodGet)
 
-	api.Handle("/data/{kind:stretch|section}/availability/{name:.+}", any(
-		mw.DBConn(http.HandlerFunc(stretchAvailabilty)))).Methods(http.MethodGet)
-
-	api.Handle("/data/{kind:stretch|section}/fairway-depth/{name:.+}", any(
-		mw.DBConn(http.HandlerFunc(stretchAvailableFairwayDepth)))).Methods(http.MethodGet)
-
-	api.Handle("/data/bottleneck/fairway-depth/{objnam:.+}", any(
-		mw.DBConn(http.HandlerFunc(bottleneckAvailableFairwayDepth)))).Methods(http.MethodGet)
-
-	api.Handle("/data/bottleneck/availability/{objnam:.+}", any(
-		mw.DBConn(http.HandlerFunc(bottleneckAvailabilty)))).Methods(http.MethodGet)
-
 	api.Handle("/data/waterlevels/{gauge:.+}", any(
 		mw.DBConn(http.HandlerFunc(waterlevels)))).Methods(http.MethodGet)