2020-09-01 20:47:57 +02:00
|
|
|
import arrow
|
2020-10-28 10:49:50 +01:00
|
|
|
from flask import make_response, redirect, url_for
|
2020-07-04 19:42:48 +02:00
|
|
|
from flask_login import login_required
|
|
|
|
|
2020-09-01 20:47:57 +02:00
|
|
|
from app.config import URL
|
2020-07-04 19:42:48 +02:00
|
|
|
from app.dashboard.base import dashboard_bp
|
|
|
|
|
|
|
|
|
|
|
|
@dashboard_bp.route("/setup_done", methods=["GET", "POST"])
|
|
|
|
@login_required
|
|
|
|
def setup_done():
|
2020-10-28 10:49:50 +01:00
|
|
|
response = make_response(redirect(url_for("dashboard.index")))
|
2020-09-01 20:47:57 +02:00
|
|
|
|
|
|
|
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
|