From 00962295750b542100c3109c9ad9cc0f6abc09d9 Mon Sep 17 00:00:00 2001 From: ahoemann Date: Mon, 2 Dec 2024 11:28:15 +0000 Subject: [PATCH] fix: renamed function; fix: remove broken html --- app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 4473c29..4d9604b 100755 --- a/app.py +++ b/app.py @@ -18,25 +18,25 @@ def homepage(): @app.route("/monitoring") def monitoring(): - git_status = get("https://git.adrianux.net") - website_status = get("https://adrianux.net") + git_status = get_status("https://git.adrianux.net") + website_status = get_status("https://adrianux.net") return render_template("monitoring.html", git_status = git_status, website_status = website_status ) def get_status_code(link): requested_site = requests.get(link) return requested_site.status_code -def get(link): +def get_status(link): match get_status_code(link): case 200: print(200) - return "ONLINE" + return "ONLINE" case 500: print(500) - return "ERROR" + return "ERROR" case _: print("OTHER") - return "OFFLINE" + return "OFFLINE" if __name__ == "__main__": app.run(debug=True)