Merged
Conversation
dburkhart07
requested changes
Oct 11, 2025
apps/backend/src/migrations/1760033134668-AddVolunteerPantryUniqueConstraint.ts
Show resolved
Hide resolved
| @PrimaryColumn({ name: 'pantry_id' }) | ||
| pantryId: number; | ||
|
|
||
| @ManyToOne(() => User, { nullable: false, onDelete: 'CASCADE' }) |
There was a problem hiding this comment.
Note for @sam-schu : I did not know about this onDelete: 'CASCADE' feature. For future work, should look into other entities to see where we may want to add this, as its quite useful.
dburkhart07
requested changes
Nov 22, 2025
dburkhart07
left a comment
There was a problem hiding this comment.
Few changes that I think would be helpful! Other than that lgtm!
apps/backend/src/volunteerAssignments/volunteerAssignments.entity.ts
Outdated
Show resolved
Hide resolved
b5d2a30 to
619fbf3
Compare
dburkhart07
approved these changes
Nov 29, 2025
dburkhart07
left a comment
There was a problem hiding this comment.
2 small changes to make, but other than that lgtm!! 🍡 🔢
sam-schu
requested changes
Nov 29, 2025
Collaborator
There was a problem hiding this comment.
Initial thoughts:
- Could we simplify some of the users service logic by adding into the user entity a many-to-many relationship with pantries that would allow you to directly access all the pantries assigned to a volunteer through the user repo? Going through the user repo should be cleaner than having to manually access the junction table
- With any remaining logic that requires directly accessing the assignments or pantry entities (hopefully not that much), could we make service functions in the corresponding services for that logic so we only directly access the user repo in the users service?
apps/backend/src/migrations/1760033134668-AddVolunteerPantryUniqueConstraint.ts
Show resolved
Hide resolved
| @PrimaryColumn({ name: 'pantry_id' }) | ||
| pantryId: number; | ||
|
|
||
| @ManyToOne(() => User, { nullable: false, onDelete: 'CASCADE' }) |
49f97bb to
192c9a5
Compare
113d065 to
1205abc
Compare
b13da6b to
8600652
Compare
8600652 to
76c4a47
Compare
sam-schu
approved these changes
Dec 4, 2025
Collaborator
sam-schu
left a comment
There was a problem hiding this comment.
Just two nits, looks great! Awesome we're getting rid of a whole module :)
swarkewalia
pushed a commit
that referenced
this pull request
Jan 18, 2026
…kend [SSF-64] Volunteer Backend Updates
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 SSF-64
📝 Description
GET /users/volunteersto return a volunteer's assigned pantry IDsGET /users/{id}/pantriesendpoint to get pantry info about volunteer's assigned pantriesPATCH /users/{id}/pantriesendpoint to assign list of pantries to a volunteer✔️ Verification
🏕️ (Optional) Future Work / Notes
Need to write tests.