aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/UserStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/UserStore.js')
-rw-r--r--src/stores/UserStore.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index 427b6454b..abec4df5d 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -161,13 +161,17 @@ export default class UserStore extends Store {
161 gaEvent('User', 'retrievePassword'); 161 gaEvent('User', 'retrievePassword');
162 } 162 }
163 163
164 @action _invite({ invites }) { 164 @action async _invite({ invites }) {
165 const data = invites.filter(invite => invite.email !== ''); 165 const data = invites.filter(invite => invite.email !== '');
166 166
167 this.inviteRequest.execute(data); 167 const response = await this.inviteRequest.execute(data)._promise;
168 168
169 // we do not wait for a server response before redirecting the user 169 this.actionStatus = response.status || [];
170 this.stores.router.push('/'); 170
171 // we do not wait for a server response before redirecting the user ONLY DURING SIGNUP
172 if (this.stores.router.location.pathname.includes(this.INVITE_ROUTE)) {
173 this.stores.router.push('/');
174 }
171 175
172 gaEvent('User', 'inviteUsers'); 176 gaEvent('User', 'inviteUsers');
173 } 177 }