From fad27b0e356f112caf934aedda4694e9682e6a90 Mon Sep 17 00:00:00 2001 From: rchrist Date: Tue, 30 Apr 2019 15:28:57 +0200 Subject: [PATCH] save --- frontend/src/pages/Profile.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index dd4ef3e..445abb3 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -301,7 +301,7 @@ this.data[0].userData = this.userName; this.email = JSON.parse(localStorage.getItem('userMail')); this.data[1].userData = this.email; - this.userRanking = "1234"; + this.getPersonalRanking(); this.data[2].userData = this.userRanking; this.teamName = "BuGa19Community"; this.data[3].userData = this.teamName; @@ -345,9 +345,9 @@ return re.test(String(email).toLowerCase()); }, getPersonalRanking() { - const name = JSON.parse(localStorage.getItem('userToken')).name; + const name = JSON.parse(localStorage.getItem('userToken')).token; console.log(JSON.parse(localStorage.getItem('userToken')).name); - this.$axios.get('/api/hello', {params: {name}}) + this.$axios.get('/api/getRankingPlace', {params: {name}}) .then((response) => { this.userRanking = response.data; console.log(response.data); @@ -375,7 +375,7 @@ }) }, getTeamData() { - const userName = {name: JSON.parse(localStorage.getItem('userToken')).name}; + const userName = {name: JSON.parse(localStorage.getItem('userToken')).token}; this.$axios.get('/api/getTeam', {params: userName}) .then(response => { console.log("getTeam: " + response);