Fix broken redirects in website login

This commit is contained in:
Slendy 2023-01-29 01:13:16 -06:00
commit 0e98dd4390
No known key found for this signature in database
GPG key ID: 7288D68361B91428

View file

@ -119,7 +119,7 @@ public class LoginForm : BaseLayout
return ServerConfiguration.Instance.Mail.MailEnabled switch return ServerConfiguration.Instance.Mail.MailEnabled switch
{ {
true when string.IsNullOrWhiteSpace(user.EmailAddress) => this.Redirect("~/login/setEmail"), true when string.IsNullOrWhiteSpace(user.EmailAddress) => this.Redirect("~/login/setEmail"),
true when user.EmailAddressVerified => this.Redirect("~/login/sendVerificationEmail"), true when !user.EmailAddressVerified => this.Redirect("~/login/sendVerificationEmail"),
_ => string.IsNullOrWhiteSpace(redirect) ? this.Redirect("~/") : this.Redirect(redirect), _ => string.IsNullOrWhiteSpace(redirect) ? this.Redirect("~/") : this.Redirect(redirect),
}; };
} }