diff --git a/public/css/app.css b/public/css/app.css old mode 100644 new mode 100755 diff --git a/public/js/app.js b/public/js/app.js old mode 100644 new mode 100755 index 3ea4433..d7d7e1a --- a/public/js/app.js +++ b/public/js/app.js @@ -23001,17 +23001,14 @@ __webpack_require__.r(__webpack_exports__); var _this = this; if (newVal !== oldVal && newVal.length === 4 && this.form.country === 'CH') { - axios.get("https://swisspost.opendatasoft.com/api/records/1.0/search/?dataset=plz_verzeichnis_v2&q=&facet=ortbez18&refine.postleitzahl=".concat(newVal)).then(function (response) { - var records = response.data.records; + axios.get("https://openplzapi.org/ch/Localities?postalCode=".concat(newVal)).then(function (response) { + var data = response.data; + /*if (records.length > 1) { + records = records.filter(rec => rec.geometry); + }*/ - if (records.length > 1) { - records = records.filter(function (rec) { - return rec.geometry; - }); - } - - if (records[0]) { - _this.form.city = records[0].fields.ortbez18; + if (data[0]) { + _this.form.city = data[0].name; } }); }