Skip to content

SSF-167 Update pantry/manufacturer applications endpoints#133

Open
Juwang110 wants to merge 4 commits intomainfrom
jw/ssf-167-update-pantry/manufacturer-applications-endpoints
Open

SSF-167 Update pantry/manufacturer applications endpoints#133
Juwang110 wants to merge 4 commits intomainfrom
jw/ssf-167-update-pantry/manufacturer-applications-endpoints

Conversation

@Juwang110
Copy link

ℹ️ Issue

Closes https://vidushimisra.atlassian.net/jira/software/projects/SSF/boards/1?selectedIssue=SSF-167

📝 Description

Added endpoints for updating existing pantry and manufacturer applications.

In manufacturer controller:
/:manufacturerId/update-application

In pantry controller:
/:pantryId/update-application

✔️ Verification

I wrote controller tests for both and service tests for the pantry route as we have yet to define manufacturer service tests. I also tested functionality with postman.

🏕️ (Optional) Future Work / Notes

N/A

@Juwang110 Juwang110 changed the title Jw/ssf 167 update pantry/manufacturer applications endpoints SSF-167 Update pantry/manufacturer applications endpoints Mar 16, 2026
@Juwang110 Juwang110 requested a review from amywng March 17, 2026 14:18
Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

small nits but lgtm


if (manufacturer?.foodManufacturerRepresentative.id !== currentUserId) {
throw new BadRequestException(
`User ${currentUserId} is not allowed to edit manufacturer ${manufacturerId}`,
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we do "edit application for Food Manufacturer {id}", same for pantries

throw new NotFoundException(`Pantry ${pantryId} not found`);
}

if (pantry?.pantryUser.id !== currentUserId) {
Copy link
Member

Choose a reason for hiding this comment

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

with the above check do we need this ? same question for manufacturers service

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