diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index f5139a6..f00b9ea 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -290,8 +290,8 @@ this.$store.commit('auth/SET_AUTHENTICATED'); this.$store.commit('auth/SET_USER'); this.email = JSON.parse(localStorage.getItem('userMail')); - this.data[1].userData = this.email; - //this.getPersonalRanking(); + this.data[0].userData = this.email; + this.getPersonalRanking(); this.getTeamData(); }, methods: { @@ -300,17 +300,11 @@ return re.test(String(email).toLowerCase()); }, getPersonalRanking() { - let token; - if (localStorage.getItem('userToken')) { - token = JSON.parse(localStorage.getItem('userToken')).token; - } else { - return; - } - this.$axios.get('/api/getRankingPlace', {params: {token}}) + let name = this.email; + this.$axios.get('/api/hello', {params: {name}}) .then((response) => { this.userRanking = response.data; - console.log(response.data); - this.data[2].userData = this.userRanking; + this.data[1].userData = this.userRanking; }).catch((error) => { this.handleError(error); }) @@ -335,9 +329,9 @@ this.currentTeamStatus = response.data.teamStatus; this.teamRanking = response.data.teamRanking; } - this.data[3].userData = this.teamName; + this.data[2].userData = this.teamName; this.dropDownSelectedItem = this.teamName; - this.data[4].userData = this.teamRanking; + this.data[3].userData = this.teamRanking; console.log("getTeam: " + response); }).catch((error) => { this.handleError(error);