mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
Added support for party invites by email (#9665)
* Added support for party invites by email * Changed to groupInvite
This commit is contained in:
parent
57193bd5f3
commit
759ce61492
2 changed files with 9 additions and 0 deletions
|
|
@ -598,11 +598,17 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let groupInvite = '';
|
||||||
|
if (this.$route.query && this.$route.query.groupInvite) {
|
||||||
|
groupInvite = this.$route.query.groupInvite;
|
||||||
|
}
|
||||||
|
|
||||||
await this.$store.dispatch('auth:register', {
|
await this.$store.dispatch('auth:register', {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
email: this.email,
|
email: this.email,
|
||||||
password: this.password,
|
password: this.password,
|
||||||
passwordConfirm: this.passwordConfirm,
|
passwordConfirm: this.passwordConfirm,
|
||||||
|
groupInvite,
|
||||||
});
|
});
|
||||||
|
|
||||||
let redirectTo;
|
let redirectTo;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ const LOCALSTORAGE_SOCIAL_AUTH_KEY = 'hello'; // Used by hello.js for social aut
|
||||||
|
|
||||||
export async function register (store, params) {
|
export async function register (store, params) {
|
||||||
let url = '/api/v3/user/auth/local/register';
|
let url = '/api/v3/user/auth/local/register';
|
||||||
|
|
||||||
|
if (params.groupInvite) url += `?groupInvite=${params.groupInvite}`;
|
||||||
|
|
||||||
let result = await axios.post(url, {
|
let result = await axios.post(url, {
|
||||||
username: params.username,
|
username: params.username,
|
||||||
email: params.email,
|
email: params.email,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue