using token instead of name for getRanking API now

This commit is contained in:
rchrist 2019-05-03 15:20:51 +02:00
parent daafe5b1f7
commit 0ea9a293a7

View File

@ -345,9 +345,8 @@
return re.test(String(email).toLowerCase());
},
getPersonalRanking() {
const name = JSON.parse(localStorage.getItem('userToken')).token;
console.log(JSON.parse(localStorage.getItem('userToken')).name);
this.$axios.get('/api/getRankingPlace', {params: {name}})
const token = JSON.parse(localStorage.getItem('userToken')).token;
this.$axios.get('/api/getRankingPlace', {params: {token}})
.then((response) => {
this.userRanking = response.data;
console.log(response.data);