Mercurial > gemma
diff pkg/controllers/surveys.go @ 2146:7267f8168176
Extending endpoint /surveys to return depth_reference
* Extending the endpoint because the depth_reference is an attribute
of the survey and could be different in principle between several
surveys.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 07 Feb 2019 17:45:00 +0100 |
parents | 8f6345ad5f13 |
children | ed0ee54fc49e |
line wrap: on
line diff
--- a/pkg/controllers/surveys.go Thu Feb 07 17:15:33 2019 +0100 +++ b/pkg/controllers/surveys.go Thu Feb 07 17:45:00 2019 +0100 @@ -28,6 +28,7 @@ SELECT s.bottleneck_id, s.date_info::text, + s.depth_reference, bg.objname AS gauge_objname FROM ( SELECT * FROM waterway.bottlenecks AS b, waterway.gauges AS g @@ -61,6 +62,7 @@ if err = rows.Scan( &survey.BottleneckID, &survey.DateInfo, + &survey.DepthReference, &survey.ReferenceGauge, ); err != nil { return