Mercurial > gemma
changeset 4782:fc082c611b8b v4.2
api/surveys list all existing surveys (no filter by gauge validity)
The api endpoint is expected to deliver all SR available for the given bottleneck.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 22 Oct 2019 17:51:46 +0200 |
parents | eb310f7e53b0 |
children | f50589814636 |
files | pkg/controllers/surveys.go |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/surveys.go Tue Oct 22 17:17:04 2019 +0200 +++ b/pkg/controllers/surveys.go Tue Oct 22 17:51:46 2019 +0200 @@ -28,7 +28,7 @@ const ( listSurveysSQL = ` -SELECT +SELECT DISTINCT s.bottleneck_id, s.date_info::text, s.depth_reference, @@ -41,7 +41,7 @@ LEFT JOIN waterway.gauges_reference_water_levels AS r ON s.depth_reference = r.depth_reference AND g.location = r.location AND g.validity = r.validity -WHERE b.objnam = $1 AND s.date_info::timestamptz <@ b.validity` +WHERE b.objnam = $1` ) func listSurveys(req *http.Request) (jr mw.JSONResult, err error) {