diff pkg/controllers/routes.go @ 1050:146245d2198f

List all bottlenecks via GET /api/bottlenecks
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 25 Oct 2018 11:30:14 +0200
parents a04126989d91
children 137a8144e581
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Thu Oct 25 10:58:37 2018 +0200
+++ b/pkg/controllers/routes.go	Thu Oct 25 11:30:14 2018 +0200
@@ -133,11 +133,16 @@
 		NoConn: true,
 	})).Methods(http.MethodGet)
 
-	// Bottleneck selection
+	// Survey selection
 	api.Handle("/surveys/{bottleneck}", any(&JSONHandler{
 		Handle: listSurveys,
 	})).Methods(http.MethodGet)
 
+	// Bottlenecks
+	api.Handle("/bottlencks", any(&JSONHandler{
+		Handle: listBottlenecks,
+	})).Methods(http.MethodGet)
+
 	// Cross sections
 	api.Handle("/cross", any(&JSONHandler{
 		Input:  func() interface{} { return new(models.CrossSectionInput) },