Mercurial > gemma
comparison pkg/controllers/srimports.go @ 4243:d776110b4db0 json-handler-middleware
Made the de-serialized input of the JSON handler accessible via the context of the request.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 22 Aug 2019 10:54:08 +0200 |
parents | 1458c9b0fdaa |
children | 4394daeea96a |
comparison
equal
deleted
inserted
replaced
4242:1458c9b0fdaa | 4243:d776110b4db0 |
---|---|
187 defer r.Close() | 187 defer r.Close() |
188 var m models.SoundingResultMeta | 188 var m models.SoundingResultMeta |
189 return &m, m.Decode(r) | 189 return &m, m.Decode(r) |
190 } | 190 } |
191 | 191 |
192 func uploadSoundingResult( | 192 func uploadSoundingResult(req *http.Request) (jr JSONResult, err error) { |
193 _ interface{}, | |
194 req *http.Request, | |
195 ) (jr JSONResult, err error) { | |
196 | 193 |
197 var dir string | 194 var dir string |
198 if dir, err = misc.StoreUploadedFile( | 195 if dir, err = misc.StoreUploadedFile( |
199 req, | 196 req, |
200 soundingResultName, | 197 soundingResultName, |