mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-17 03:08:51 +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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue