Skip to content

MSPCA-9: approve deny match and get all volunteers - #3

Merged
shreeyaadhikari merged 19 commits into
mainfrom
sa/mspca-9-approve-deny-match-and-get-all-volunteers
Oct 14, 2026
Merged

shreeyaadhikari merged 19 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

@dburkhart07 dburkhart07 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of similar comments from the other pr to be applied here, aside from that looks pretty good after this!

Comment thread apps/backend/src/matches/matches.controller.spec.ts
Comment thread apps/backend/src/matches/matches.controller.ts
Comment thread apps/backend/src/matches/matches.controller.ts
Comment thread apps/backend/src/matches/matches.controller.ts Outdated
Comment thread apps/backend/src/matches/matches.controller.ts Outdated
Comment thread apps/backend/src/matches/matches.service.spec.ts Outdated
Comment thread apps/backend/src/matches/matches.service.spec.ts
Comment thread apps/backend/src/matches/matches.service.spec.ts Outdated
Comment thread apps/backend/src/volunteers/volunteers.controller.ts Outdated
Comment thread apps/backend/src/volunteers/volunteers.service.ts Outdated

@dburkhart07 dburkhart07 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we also document all service functions using the following docstring format:

  • Summary line describing the function
  • Additional context about behavior or edge cases
  • @PARAM tags for parameters
  • @return tags for return value
  • @throw tags for any exceptions they throw

@shreeyaadhikari shreeyaadhikari changed the title Sa/mspca 9 approve deny match and get all volunteers MSPCA-9: approve deny match and get all volunteers Oct 2, 2026

@dburkhart07 dburkhart07 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! make sure to add the match module and volunteers module to the app module, as well as remove the same changes in the plural naming strategy as the other pr so the endpoints work!

Comment thread package.json
Comment thread apps/backend/src/volunteers/volunteers.service.spec.ts
Comment thread apps/backend/src/matches/matches.controller.ts Outdated
Comment thread apps/backend/src/matches/matches.controller.ts Outdated
… sa/mspca-9-approve-deny-match-and-get-all-volunteers

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so sorry i reviewed it earlier but didn't submit the review so it was just lurking 💀

Comment thread apps/backend/src/volunteers/volunteers.controller.ts Outdated
Comment thread apps/backend/src/matches/dtos/deny-match.dto.ts
Comment thread apps/backend/src/volunteers/volunteers.controller.ts Outdated
Comment thread apps/backend/src/matches/matches.controller.spec.ts Outdated

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+some thoughts :)

Comment thread apps/backend/src/matches/dtos/deny-match.dto.ts
Comment thread apps/backend/src/matches/matches.controller.ts
Comment thread apps/backend/src/matches/matches.service.ts

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all comments addressed & tested endpoints~

AYYY amazing gorgeous never the same

thanks shreeya you're osm!

@shreeyaadhikari
shreeyaadhikari merged commit d992c2d into main Oct 14, 2026
10 checks passed
@shreeyaadhikari
shreeyaadhikari deleted the sa/mspca-9-approve-deny-match-and-get-all-volunteers branch October 14, 2026 14:08
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.

3 participants