From b00a40f05444075884acbd576ac87a9eb6413ca4 Mon Sep 17 00:00:00 2001 From: Teo-coder296 Date: Tue, 28 Oct 2025 09:30:18 +0000 Subject: [PATCH 1/2] Add extracurricular activities to the API --- src/app.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/app.py b/src/app.py index 4ebb1d9..7361a29 100644 --- a/src/app.py +++ b/src/app.py @@ -38,6 +38,48 @@ "schedule": "Mondays, Wednesdays, Fridays, 2:00 PM - 3:00 PM", "max_participants": 30, "participants": ["john@mergington.edu", "olivia@mergington.edu"] + }, + + # Sports-related activities + "Soccer Team": { + "description": "Competitive soccer practices and matches", + "schedule": "Mondays, Wednesdays, 4:00 PM - 6:00 PM", + "max_participants": 22, + "participants": ["alex@mergington.edu", "nina@mergington.edu"] + }, + "Basketball Club": { + "description": "Casual and competitive basketball sessions", + "schedule": "Tuesdays, Thursdays, 4:00 PM - 6:00 PM", + "max_participants": 18, + "participants": ["leo@mergington.edu"] + }, + + # Artistic activities + "Art Club": { + "description": "Explore drawing, painting, and mixed media projects", + "schedule": "Wednesdays, 3:30 PM - 5:00 PM", + "max_participants": 16, + "participants": ["maya@mergington.edu", "liam@mergington.edu"] + }, + "Drama Club": { + "description": "Acting workshops and school play productions", + "schedule": "Fridays, 3:30 PM - 5:30 PM", + "max_participants": 25, + "participants": ["sarah@mergington.edu"] + }, + + # Intellectual activities + "Debate Team": { + "description": "Prepare for interschool debates and improve public speaking", + "schedule": "Thursdays, 3:30 PM - 5:00 PM", + "max_participants": 14, + "participants": ["oliver@mergington.edu", "ava@mergington.edu"] + }, + "Science Club": { + "description": "Hands-on experiments, science fairs, and guest lectures", + "schedule": "Mondays, 3:30 PM - 5:00 PM", + "max_participants": 20, + "participants": ["ethan@mergington.edu"] } } @@ -54,6 +96,7 @@ def get_activities(): @app.post("/activities/{activity_name}/signup") def signup_for_activity(activity_name: str, email: str): + # Validate student is not already signed up for the activity """Sign up a student for an activity""" # Validate activity exists if activity_name not in activities: From 215f5ed54e195b114753caa1f35df107fbcc7d52 Mon Sep 17 00:00:00 2001 From: Teo-coder296 Date: Tue, 28 Oct 2025 14:43:09 +0200 Subject: [PATCH 2/2] Create workspace.xml --- .idea/workspace.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..d98934d --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 1761653356907 + + + + \ No newline at end of file