Mercurial > gemma
comparison pkg/controllers/uploadedimports.go @ 4311:f9bb06f2dbe3
Added stub for a shape upload stretch import. POST /api/imports/stsh
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 03 Sep 2019 13:02:09 +0200 |
parents | 4394daeea96a |
children | 5f47eeea988d |
comparison
equal
deleted
inserted
replaced
4310:3d6941046858 | 4311:f9bb06f2dbe3 |
---|---|
133 return &imports.UploadedGaugeMeasurement{Dir: dir}, nil | 133 return &imports.UploadedGaugeMeasurement{Dir: dir}, nil |
134 }, | 134 }, |
135 ) | 135 ) |
136 } | 136 } |
137 | 137 |
138 func importUploadedStretchShape() http.HandlerFunc { | |
139 return uploadedImport( | |
140 imports.STSHJobKind, | |
141 "stretch.zip", | |
142 func(_ *http.Request, dir string) (imports.Job, error) { | |
143 return &imports.StretchShape{Dir: dir}, nil | |
144 }, | |
145 ) | |
146 } | |
147 | |
138 func (bup badUploadParameterError) Error() string { | 148 func (bup badUploadParameterError) Error() string { |
139 return string(bup) | 149 return string(bup) |
140 } | 150 } |
141 | 151 |
142 func uploadedImport( | 152 func uploadedImport( |