-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
backendthis ticket is part of the backendthis ticket is part of the backend
Description
Create an API function to filter volunteers by their cohorts. Here are some resources:
- Our Supabase dashboard's documentation on how to work with Volunteers table
- Our Supabase Volunteer table schema.
- Our Supabase dashboard's documentation on how to work with VolunteerCohorts table
- Our Supabase VolunteerCohorts table schema.
- Our Supabase dashboard's documentation on how to work with Cohorts table
- Our Supabase Cohorts table schema.
- Our database schema which helps you visualize how the tables are connected
Params:
- < op>: string - Either "AND" [to require matching all values] or "OR" [to require matching any of the values])
- < values>: List<Tuple<string, string>> - the values to filter for (e.g. [("Fall", "2025"), ("Spring", "2023")])
Returns:
- the resulting rows after filtering
Notes:
- The API functions should be written inside src/lib/api/
- Ensure proper error handling and validation of input data
- If you need to install any dependency, write about it on your PR.
The goal is to:
- Create a GET endpoint that accepts role filter parameters and returns filtered volunteer data from Supabase
- Support filtering by single or multiple cohorts
- Return appropriate success/error responses with HTTP status codes.
Metadata
Metadata
Assignees
Labels
backendthis ticket is part of the backendthis ticket is part of the backend