Mercurial > gemma
diff pkg/controllers/routes.go @ 5321:0919946f624b extented-report
Added a report controller.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 27 May 2021 01:22:10 +0200 |
parents | 6ba7e6ac0882 |
children | 348d91848278 96ceb150ea46 |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Wed May 26 19:10:45 2021 +0200 +++ b/pkg/controllers/routes.go Thu May 27 01:22:10 2021 +0200 @@ -322,6 +322,11 @@ NoConn: true, })).Methods(http.MethodPut) + // Handler for reporting + + api.Handle("/data/report/{name:[a-zA-Z0-9_]+}", waterwayAdmin( + mw.DBConn(http.HandlerFunc(report)))).Methods(http.MethodGet) + // Handler to serve data to the client. api.Handle("/data/{type:availability|fairway}/{kind:stretch|section|bottleneck}/{name:.+}", any(