From 59dd4b8b2b8fa565202ddfd05fc5affa7bd51f99 Mon Sep 17 00:00:00 2001 From: rchrist Date: Thu, 9 May 2019 13:07:19 +0200 Subject: [PATCH] some changes at createTeam --- frontend/src/pages/Profile.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index f00b9ea..57a7ab4 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -293,6 +293,7 @@ this.data[0].userData = this.email; this.getPersonalRanking(); this.getTeamData(); + this.fetchTeamInvites(); }, methods: { validateEmail(email) { @@ -328,6 +329,7 @@ this.teamName = response.data; this.currentTeamStatus = response.data.teamStatus; this.teamRanking = response.data.teamRanking; + this.fetchTeamMembers(); } this.data[2].userData = this.teamName; this.dropDownSelectedItem = this.teamName; @@ -364,7 +366,7 @@ return; } params.name = this.newTeamName; - this.$axios.post('/api/createTeam', {params: {params}}) + this.$axios.post('/api/createTeam', {params}) .then(response => { console.log("createTeam: " + response); this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { @@ -378,7 +380,7 @@ }, fetchTeamMembers() { let name = this.teamName; - this.$axios.get('/api/getTeamMembers', {name}) + this.$axios.get('/api/getTeamMembers', {params: {name}}) .then((response) => { console.log(response.data); this.teamMembers = response.data; @@ -393,7 +395,7 @@ } else { return; } - this.$axios.get('/api/getMyTeamInvites', {token}) + this.$axios.get('/api/getMyTeamInvites', {params: {token}}) .then((response) => { console.log(response.data); this.teamInvites = response.data; @@ -409,7 +411,7 @@ return; } params.teamID = inviteId; - this.$axios.put('/api/joinTeam', {params}) + this.$axios.put('/api/joinTeam', {params: {params}}) .then((response) => { console.log(response.data); this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { @@ -429,7 +431,7 @@ return; } params.teamInviteID = inviteId; - this.$axios.delete('/api/deleteTeamInvite', {params}) + this.$axios.delete('/api/deleteTeamInvite', {params: {params}}) .then((response) => { console.log(response.data); this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { @@ -449,7 +451,7 @@ return; } params.invitedUserEmail = this.inviteMail; - this.$axios.post('/api/sendTeamInvite', {params}) + this.$axios.post('/api/sendTeamInvite', {params: {params}}) .then((response) => { console.log(response.data); }).catch((error) => { @@ -464,7 +466,7 @@ return; } params.teamStatus = this.teamStatus; - this.$axios.put('/api/setTeamStatus', {params}) + this.$axios.put('/api/setTeamStatus', {params: {params}}) .then((response) => { console.log(response.data); this.getTeamData();