fix: Don't show downtime message when in maintainance mode
All checks were successful
Build Docker / BuildImage (push) Successful in 1m3s
Check Code Quality / RuffCheck (push) Successful in 1m4s

This commit is contained in:
2025-11-15 14:59:02 +11:00
parent 06526ca92d
commit 3791d0be6e

View File

@@ -325,7 +325,10 @@ def index():
custom = "" custom = ""
# Check for downtime # Check for downtime
uptime = requests.get("https://uptime.woodburn.au/api/status-page/main/badge") uptime = requests.get("https://uptime.woodburn.au/api/status-page/main/badge")
uptime = uptime.content.count(b"Up") > 1 if "maintenance" in uptime.content.decode("utf-8").lower():
uptime = True
else:
uptime = uptime.content.count(b"Up") > 1
if uptime: if uptime:
custom += "<style>#downtime{display:none !important;}</style>" custom += "<style>#downtime{display:none !important;}</style>"