fix invite token logic

This commit is contained in:
sua yoo 2021-12-05 19:01:21 -08:00
parent efaaece842
commit ddf1b63313
No known key found for this signature in database
GPG Key ID: 5AD1B4C02D4F0567

View File

@ -138,9 +138,12 @@ export class SignUpForm extends LiteElement {
newArchive: true, newArchive: true,
}; };
if (this.inviteToken && this.isArchiveInvite) { if (this.inviteToken) {
registerParams.inviteToken = this.inviteToken; registerParams.inviteToken = this.inviteToken;
registerParams.newArchive = false;
if (this.isArchiveInvite) {
registerParams.newArchive = false;
}
} }
const resp = await fetch("/api/auth/register", { const resp = await fetch("/api/auth/register", {