# HG changeset patch # User Thomas Junk # Date 1542973482 -3600 # Node ID 3c91930367ee91f20ad6b947b59036380bdef6bb # Parent 0e9dd3cd7b53b9543b2b41fa279607846d25943c import sounding results: manually add formdata diff -r 0e9dd3cd7b53 -r 3c91930367ee client/src/components/map/contextbox/ImportSoundingresults.vue --- a/client/src/components/map/contextbox/ImportSoundingresults.vue Fri Nov 23 12:04:26 2018 +0100 +++ b/client/src/components/map/contextbox/ImportSoundingresults.vue Fri Nov 23 12:44:42 2018 +0100 @@ -194,14 +194,12 @@ confirm() { let formData = new FormData(); formData.append("token", this.token); - const mapping = { - bottleneck: "bottleneck", - importDate: "date", - depthReference: "depth-reference" - }; - ["bottleneck", "importDate", "depthReference"].forEach(x => { - if (this[x]) formData.append(mapping[x], this[x]); - }); + if (this.bottleneck) formData.append("bottleneck", this.bottleneck); + if (this.importDate) + formData.append("date", this.importDate.split("T")[0]); + if (this.depthReference) + formData.append("depth-reference", this.depthReference); + HTTP.post("/imports/soundingresult", formData, { headers: { "X-Gemma-Auth": localStorage.getItem("token"),