Commit 051ec16c authored by Rémy Marronnier's avatar Rémy Marronnier

test cors

parent 37c6fb2c
......@@ -2,7 +2,6 @@ import { BAN_API_URL } from "./config";
export default function BANService(postcode) {
return fetch(BAN_API_URL.concat(postcode), {
credentials: 'include',
method: "GET",
headers: {
'Accept': 'application/json',
......
......@@ -58,6 +58,7 @@ export default {
citycode: null,
validity: false,
results: [],
isLoading: false,
search: null,
model: null
}),
......@@ -111,13 +112,14 @@ export default {
// Lazily load input items
BANService(this.address)
.then(res => res.json())
.then(res => {
this.results = res.features;
})
// .catch(err => {
// //console.log(err);
.then(res => alert(res.type))
// res.json())
// .then(results => {
// this.results = results.features;
// })
// // .catch(err => {
// // //console.log(err);
// // })
.finally(() => (this.isLoading = false));
}
}
......
......@@ -75,8 +75,11 @@ export default {
submitAllocation() {
this.validate();
this.$store.dispatch("submitAllocation", this.allocation_type);
//if value != none OR !retraite...
if (this.allocation_type != "none") {
this.$router.push("montant-ARE");
} else {
this.$router.push("votre-age");
}
}
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment