mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 05:58:25 -04:00
ugh
This commit is contained in:
@@ -36,7 +36,7 @@ from notifications_utils.recipients import format_phone_number_human_readable
|
||||
|
||||
@socketio.on("fetch_daily_stats")
|
||||
def handle_fetch_daily_stats():
|
||||
service_id = session.get('service_id')
|
||||
service_id = session.get("service_id")
|
||||
if service_id:
|
||||
date_range = get_stats_date_range()
|
||||
daily_stats = service_api_client.get_service_notification_statistics_by_day(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
import requests
|
||||
from flask import current_app, redirect, url_for
|
||||
from flask import current_app, redirect, session, url_for
|
||||
from flask_login import current_user
|
||||
|
||||
from app.main import main
|
||||
@@ -26,11 +26,19 @@ def _sign_out_at_login_dot_gov():
|
||||
@main.route("/sign-out", methods=(["GET", "POST"]))
|
||||
def sign_out():
|
||||
# An AnonymousUser does not have an id
|
||||
current_app.logger.info("HIT THE REGULAR SIGN OUT")
|
||||
|
||||
if current_user.is_authenticated:
|
||||
# TODO This doesn't work yet, due to problems above.
|
||||
current_user.deactivate()
|
||||
|
||||
session.clear()
|
||||
|
||||
current_user.sign_out()
|
||||
|
||||
session.permanent = False
|
||||
|
||||
login_dot_gov_logout_url = os.getenv("LOGIN_DOT_GOV_LOGOUT_URL")
|
||||
if login_dot_gov_logout_url:
|
||||
current_app.config["SESSION_PERMANENT"] = False
|
||||
return redirect(login_dot_gov_logout_url)
|
||||
return redirect(url_for("main.index"))
|
||||
|
||||
Reference in New Issue
Block a user