app-MAIL-temp/app/onboarding/views/account_activated.py
Carlos Quintana ba6c5f93ac
Add extension_redirect endpoint (#1093)
* Add extension_redirect endpoint

* Add test for extension_redirect
2022-06-16 09:56:00 +02:00

19 lines
542 B
Python

from app.onboarding.base import onboarding_bp
from app.onboarding.utils import get_extension_info
from flask import redirect, render_template, url_for
from flask_login import login_required
@onboarding_bp.route("/account_activated", methods=["GET"])
@login_required
def account_activated():
info = get_extension_info()
if not info:
return redirect(url_for("dashboard.index"))
return render_template(
"onboarding/account_activated.html",
extension_link=info.url,
browser_name=info.browser,
)