Skip to content

Sa/mspca 9 approve deny match and get all volunteers - #3

Open
shreeyaadhikari wants to merge 9 commits into
mainfrom
sa/mspca-9-approve-deny-match-and-get-all-volunteers
Open

shreeyaadhikari wants to merge 9 commits into
mainfrom
sa/mspca-9-approve-deny-match-and-get-all-volunteers

Conversation

@shreeyaadhikari

@shreeyaadhikari shreeyaadhikari commented Sep 26, 2026 •

Copy link
Copy Markdown

ℹ️ Issue

Closes MSPCA-9

📝 Description

Adds the ability for foster coordinators to approve or deny pending matches, and to view a full list of volunteers regardless of their match status.

Briefly list the changes made to the code:

  1. Added PATCH /matches/:matchId/approve which sets a match's status to COMPLETE.
  2. Added PATCH /matches/:matchId/deny which sets a match's status to DENIED and stores a required, non-empty deniedReason on the match.
  3. Added DenyMatchDto with @ IsNotEmpty()/@ IsString() validation so requests with a missing or empty reason are rejected with a 400 before reaching the service layer.
  4. Added GET /volunteers which returns the full list of volunteers with no filtering, giving coordinators visibility into all volunteers regardless of match status.
  5. Added validateId checks in MatchesController for both new endpoints, returning a 400 for invalid IDs and a 404 (via NotFoundException) when a match isn't found.
  6. Added service and controller tests

✔️ Verification

Ran yarn test. All service and controller tests pass for MatchesService, MatchesController, VolunteersService and VolunteersController.

@shreeyaadhikari
shreeyaadhikari marked this pull request as ready for review September 27, 2026 21:14
@shreeyaadhikari
shreeyaadhikari requested review from Yurika-Kan and dburkhart07 and a lite review from Copilot September 28, 2026 02:08
@shreeyaadhikari
shreeyaadhikari removed the request for review from Copilot September 28, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants