Mercurial > gemma
diff pkg/controllers/routes.go @ 5324:348d91848278 extented-report
Added and endpoint GET /api/data/reports to list the available report templates.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 30 May 2021 01:26:36 +0200 |
parents | 0919946f624b |
children | c008e13fa1d1 |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Sat May 29 17:19:03 2021 +0200 +++ b/pkg/controllers/routes.go Sun May 30 01:26:36 2021 +0200 @@ -324,6 +324,12 @@ // Handler for reporting + api.Handle("/data/reports", + waterwayAdmin(&mw.JSONHandler{ + Handle: listReports, + NoConn: true, + })).Methods(http.MethodGet) + api.Handle("/data/report/{name:[a-zA-Z0-9_]+}", waterwayAdmin( mw.DBConn(http.HandlerFunc(report)))).Methods(http.MethodGet)