Added support for party invites by email (#9665)

* Added support for party invites by email

* Changed to groupInvite
This commit is contained in:
Keith Holliday 2017-12-07 12:57:01 -05:00 committed by GitHub
parent 57193bd5f3
commit 759ce61492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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;

View file

@ -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,