From 759ce61492c5b146d6fea50fa4e5da7dbdb78071 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Thu, 7 Dec 2017 12:57:01 -0500 Subject: [PATCH] Added support for party invites by email (#9665) * Added support for party invites by email * Changed to groupInvite --- website/client/components/static/home.vue | 6 ++++++ website/client/store/actions/auth.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/website/client/components/static/home.vue b/website/client/components/static/home.vue index 05f1bf6716..88849662b8 100644 --- a/website/client/components/static/home.vue +++ b/website/client/components/static/home.vue @@ -598,11 +598,17 @@ return; } + let groupInvite = ''; + if (this.$route.query && this.$route.query.groupInvite) { + groupInvite = this.$route.query.groupInvite; + } + await this.$store.dispatch('auth:register', { username: this.username, email: this.email, password: this.password, passwordConfirm: this.passwordConfirm, + groupInvite, }); let redirectTo; diff --git a/website/client/store/actions/auth.js b/website/client/store/actions/auth.js index 0a6cafa95b..5bbc2c9f57 100644 --- a/website/client/store/actions/auth.js +++ b/website/client/store/actions/auth.js @@ -5,6 +5,9 @@ const LOCALSTORAGE_SOCIAL_AUTH_KEY = 'hello'; // Used by hello.js for social aut export async function register (store, params) { let url = '/api/v3/user/auth/local/register'; + + if (params.groupInvite) url += `?groupInvite=${params.groupInvite}`; + let result = await axios.post(url, { username: params.username, email: params.email,