router-link(tag="div", :to="{path: '/user/'+ getUserId(result.id)}")
getUserId(uid) {
axios.get("http://127.0.0.1:3000/blabla/"+uid).then((response) => {
return response.data[0].id;
});
}
router-link(tag="div", :to="{path: '/user/'+ userId}")
data() {
return {
userId: 0
}
},
mounted () {
this.getUserId(id)
},
methods: {
getUserId(uid) {
axios.get("http://127.0.0.1:3000/blabla/"+uid).then((response) => {
this.userId = response.data[0].id;
}).catch(error => {
console.log(error);
});
}
}