Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Juwang110
force-pushed
the
jw/mspca-10-volunteer-matches-endpoint
branch
from
September 27, 2026 17:58
f115399 to
99c6b35
Compare
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Juwang110
marked this pull request as ready for review
September 27, 2026 18:00
dburkhart07
requested changes
Sep 29, 2026
dburkhart07
left a comment
Collaborator
There was a problem hiding this comment.
just a few smalls. Some general formatting and logic things that I pointed out in your other PR apply here too. Can you make sure those changes are reflected in this one as well?
|
|
||
| @Get('/:volunteerId/matches') | ||
| async getVolunteerMatches( | ||
| @Param('volunteerId') volunteerId: string, |
Collaborator
There was a problem hiding this comment.
Can we make this use the ParseIntPipe and treat is as an integer instead?
|
|
||
| const result = await service.existsById(7); | ||
|
|
||
| expect(result).toBe(false); |
Collaborator
There was a problem hiding this comment.
can we make sure that the repo.existsBy was not called in this case?
| }); | ||
|
|
||
| it.each(['abc', '0', '-3', ''])( | ||
| 'throws BadRequestException for invalid id %p', |
Collaborator
There was a problem hiding this comment.
i don't think we need to be testing the invalid ids. while it is good to, we already know validateId works. Let's remove these.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ℹ️ Issue
Closes MSPCA-10
📝 Description
Adds
GET /api/volunteers/:volunteerId/matches, which returns every match for a volunteer withmatchId,chameleonAnimalId,status, anddeniedReason. A volunteer with no matches gets[]with a 200. An unknown volunteer gets a 404, and a non-numeric or non-positive id gets a 400.Changes:
MatchesService.findByVolunteerIdandVolunteersService.existsById.existsByIdis identical to the one in MSPCA-11 Add POST /recommendations endpoint #4, so the two PRs merge cleanly there. The 404 depends on whether the volunteer exists, not on whether the result is empty, which keeps "no matches" a 200.VolunteersModuleimportsMatchesModuleandCoordinatorsModule, and is now registered inAppModule. Before this, no feature module was mounted, so the route would never have been served.PluralNamingStrategy.columnName, which ignored@Column({ name }). Every named column was queried by its camelCase property name ("volunteerId"rather thanvolunteer_id), so any query against a real DB returned a 500. This affects every entity. The same commit is on MSPCA-11 Add POST /recommendations endpoint #4.✔️ Verification
yarn test: all backend suites pass (20 suites, 154 tests), including new service and controller tests.yarn lint:checkandyarn format:checkare clean.npx nx serve backendand run:[]. An unknown id returned 404 andabcreturned 400.🏕️ (Optional) Future Work / Notes