From c0ab108cbf86d1f09c72861efb2abb7c1c6c876f Mon Sep 17 00:00:00 2001 From: Antoni Czaplicki <56671347+Antoni-Czaplicki@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:54:14 +0100 Subject: [PATCH] Fix fetching messages --- vulcan/_api_helper.py | 1 + vulcan/_endpoints.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vulcan/_api_helper.py b/vulcan/_api_helper.py index b196660..da2a0b7 100644 --- a/vulcan/_api_helper.py +++ b/vulcan/_api_helper.py @@ -77,6 +77,7 @@ async def get_list( if not message_box: raise AttributeError("No message box specified.") query["box"] = message_box + query["pupilId"] = student.pupil.id if date_from: query["dateFrom"] = date_from.strftime("%Y-%m-%d") diff --git a/vulcan/_endpoints.py b/vulcan/_endpoints.py index 7d19bb8..42cdab2 100644 --- a/vulcan/_endpoints.py +++ b/vulcan/_endpoints.py @@ -18,7 +18,7 @@ DATA_GRADE_SUMMARY = "grade/summary" DATA_GRADE_AVERAGE = "grade/average" DATA_HOMEWORK = "homework" -DATA_MESSAGE = "messagebox/message" +DATA_MESSAGE = "messages/received" DATA_MESSAGEBOX = "messagebox" DATA_TIMETABLE = "schedule" DATA_TIMETABLE_CHANGES = "schedule/changes"