remove header banner when site is down

This commit is contained in:
Beverly Nguyen
2025-04-21 16:26:07 -07:00
parent 10c61440c9
commit 431dbb10dd
4 changed files with 40 additions and 33 deletions

View File

@@ -19,7 +19,6 @@ from app.main.views.sub_navigation_dictionaries import (
about_notify_nav,
using_notify_nav,
)
from app.utils.api_health import is_api_down
from app.utils.user import user_is_logged_in
logger = logging.getLogger(__name__)
@@ -47,16 +46,10 @@ def index():
if current_user and current_user.is_authenticated:
return redirect(url_for("main.choose_account"))
try:
counts = status_api_client.get_count_of_live_services_and_organizations()
except Exception as e:
logger.warning(f"API down when loading homepage: {e}")
counts = None
return render_template(
"views/signedout.html",
sms_rate=CURRENT_SMS_RATE,
counts=counts,
is_api_down=is_api_down(),
counts=status_api_client.get_count_of_live_services_and_organizations()
)