diff pkg/controllers/routes.go @ 473:b2dea4e56ff1

/api/published (GET) returns a JSON document of the geo-services published by the gemma server.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 23 Aug 2018 13:24:26 +0200
parents 39b5deee8810
children 11d80120ed3d
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Thu Aug 23 12:57:15 2018 +0200
+++ b/pkg/controllers/routes.go	Thu Aug 23 13:24:26 2018 +0200
@@ -90,6 +90,10 @@
 			http.MethodGet, http.MethodPost,
 			http.MethodPut, http.MethodDelete)
 
+	api.Handle("/published", any(&JSONHandler{
+		Handle: published,
+	})).Methods(http.MethodGet)
+
 	// Token handling: Login/Logout.
 	api.HandleFunc("/login", login).
 		Methods(http.MethodGet, http.MethodPost)