mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
refactor
This commit is contained in:
parent
d9d67df126
commit
19088ba85f
1 changed files with 3 additions and 3 deletions
|
@ -251,15 +251,15 @@ def cancel_mailbox_change_route(mailbox_id):
|
|||
@dashboard_bp.route("/mailbox/confirm_change")
|
||||
def mailbox_confirm_change_route():
|
||||
s = Signer(MAILBOX_SECRET)
|
||||
mailbox_id = request.args.get("mailbox_id")
|
||||
signed_mailbox_id = request.args.get("mailbox_id")
|
||||
|
||||
try:
|
||||
r_id = int(s.unsign(mailbox_id))
|
||||
mailbox_id = int(s.unsign(signed_mailbox_id))
|
||||
except Exception:
|
||||
flash("Invalid link", "error")
|
||||
return redirect(url_for("dashboard.index"))
|
||||
else:
|
||||
mailbox = Mailbox.get(r_id)
|
||||
mailbox = Mailbox.get(mailbox_id)
|
||||
|
||||
# new_email can be None if user cancels change in the meantime
|
||||
if mailbox and mailbox.new_email:
|
||||
|
|
Loading…
Reference in a new issue