comparison 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
comparison
equal deleted inserted replaced
472:39b5deee8810 473:b2dea4e56ff1
88 api.Handle("/internal/{entry}", internalAuth). 88 api.Handle("/internal/{entry}", internalAuth).
89 Methods( 89 Methods(
90 http.MethodGet, http.MethodPost, 90 http.MethodGet, http.MethodPost,
91 http.MethodPut, http.MethodDelete) 91 http.MethodPut, http.MethodDelete)
92 92
93 api.Handle("/published", any(&JSONHandler{
94 Handle: published,
95 })).Methods(http.MethodGet)
96
93 // Token handling: Login/Logout. 97 // Token handling: Login/Logout.
94 api.HandleFunc("/login", login). 98 api.HandleFunc("/login", login).
95 Methods(http.MethodGet, http.MethodPost) 99 Methods(http.MethodGet, http.MethodPost)
96 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). 100 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))).
97 Methods(http.MethodGet, http.MethodPost) 101 Methods(http.MethodGet, http.MethodPost)