Skip to content

BE 1.5 - Implement filter_general API function #30

@notjackl3

Description

@notjackl3

Create an API function to filter volunteers by their general information (such as email, phone, position, etc.). Here are some resources:

Params:

  • < op>: string - Either "AND" [to require matching all values] or "OR" [to require matching any of the values])
  • < column>: string - a single column to filter for (e.g. name_org, email, position, etc.)
  • < values>: List< string> - the values from the same column to filter for (e.g. f2f, front_desk)

Returns:

  • the resulting rows after filtering

Notes:

  • Make sure to include all of the personal information that a user may have:
     - name_org
     - pseudonym
     - pronouns
     - email
     - phone
     - position
     - opt_in_communication
  • 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 a single general information filter parameters and returns filtered volunteer data from Supabase
  • 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