From 81a306c5908a0a08b21a0131ad3ef38e2bc36542 Mon Sep 17 00:00:00 2001 From: Belissimo_T Date: Sat, 17 Jun 2023 00:27:31 +0200 Subject: [PATCH] fix 1340b711, oops --- server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index 73d6ee9..5eab0f5 100644 --- a/server.py +++ b/server.py @@ -41,7 +41,6 @@ def meta(school_num): teachers_data = json.loads(cache.get_meta_file("teachers.json"))["teachers"] forms_data = json.loads(cache.get_meta_file("forms.json")) rooms_data = json.loads(cache.get_meta_file("rooms.json")) - exams_data = json.loads(cache.get_meta_file("exams.json")) dates_data = json.loads(cache.get_meta_file("dates.json")) dates = sorted([datetime.datetime.strptime(elem, "%Y-%m-%d").date() for elem in list(dates_data.keys())]) @@ -53,7 +52,6 @@ def meta(school_num): "teachers": teachers_data, "forms": forms_data, "rooms": rooms_data, - "exams": exams_data, "date": date.strftime("%Y-%m-%d") }), mimetype='application/json') @@ -85,18 +83,18 @@ def plan(school_num: str): plan_data = cache.get_plan_file(date, revision, "plans.json") rooms_data = cache.get_plan_file(date, revision, "rooms.json") info_data = cache.get_plan_file(date, revision, "info.json") - + exams_data = cache.get_plan_file(date, revision, "exams.json") except FileNotFoundError: return {"error": "Invalid revision."} return { "plans": json.loads(plan_data), "rooms": json.loads(rooms_data), + "exams": json.loads(exams_data), "info": json.loads(info_data) } - @app.route(f"{API_BASE_URL}/authorize", methods=["GET", "POST"]) def authorize(school_num: str): with open(".cache/auth.log", "a") as f: