diff --git a/app/onboarding/__init__.py b/app/onboarding/__init__.py index 16b6263f..42673e93 100644 --- a/app/onboarding/__init__.py +++ b/app/onboarding/__init__.py @@ -1,4 +1,5 @@ from .views import ( index, final, + setup_done, ) diff --git a/app/onboarding/views/setup_done.py b/app/onboarding/views/setup_done.py new file mode 100644 index 00000000..41c2ec7b --- /dev/null +++ b/app/onboarding/views/setup_done.py @@ -0,0 +1,23 @@ +import arrow +from flask import make_response, render_template +from flask_login import login_required + +from app.config import URL +from app.onboarding.base import onboarding_bp + + +@onboarding_bp.route("/setup_done", methods=["GET", "POST"]) +@login_required +def setup_done(): + response = make_response(render_template("onboarding/setup_done.html")) + + response.set_cookie( + "setup_done", + value="true", + expires=arrow.now().shift(days=30).datetime, + secure=True if URL.startswith("https") else False, + httponly=True, + samesite="Lax", + ) + + return response diff --git a/templates/onboarding/index.html b/templates/onboarding/index.html index d34b6996..0e51f6d5 100644 --- a/templates/onboarding/index.html +++ b/templates/onboarding/index.html @@ -20,8 +20,8 @@