Skip to content

BE 1.5 - Implement filter_by_cohort API function #29

@notjackl3

Description

@notjackl3

Create an API function to filter volunteers by their cohorts. Here are some resources:

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 backend

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions