Skip to content

backend validation accept/deny#119

Open
swarkewalia wants to merge 3 commits intomainfrom
sk/SSF-151-restrict-actions
Open

backend validation accept/deny#119
swarkewalia wants to merge 3 commits intomainfrom
sk/SSF-151-restrict-actions

Conversation

@swarkewalia
Copy link

@swarkewalia swarkewalia commented Mar 8, 2026

ℹ️ Issue

Closes

📝 Description

added backend validation to throw a BadRequestException when a user tries to approve or deny a non pending pantry or manufacturer. also found a bug with foodManufacturer missing relations so fixed that too!

✔️ Verification

tried to approve/deny a non pending pantry/manufacturer

Copy link

@Juwang110 Juwang110 left a comment

Choose a reason for hiding this comment

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

Honestly lgtm, one thing though. @sam-schu @Yurika-Kan I was going to comment to add test cases for these new bad request exceptions but it seems like approve/deny routes for both manufacturers and pantries don't have service tests. Should we add them here or is it fine?

@sam-schu
Copy link
Collaborator

sam-schu commented Mar 9, 2026

@Juwang110 We don't have manufacturers service tests at all yet, and the pantries service tests are still mocking the repository. We don't need to worry about those tests here, we will add/update them in a future ticket!

@Juwang110 Juwang110 self-requested a review March 9, 2026 15:59
Copy link

@Juwang110 Juwang110 left a comment

Choose a reason for hiding this comment

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

lgtm then!

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