Skip to content

Conversation

@bhuvanh66
Copy link

ℹ️ Issue

Closes 63

📝 Description

Added an endpoint to the pantries controller to get all orders for a particular pantry, along with the associated food request for each order.

In order to do this, I had to update the pantries controller as well as the order service to access all of the orders we have.

I added a new route: GET /pantries/orders/:pantryid

✔️ Verification

I tested the route using pantries in my database. I used a pantry with multiple orders to verify that the route works:
Screenshot 2025-10-19 at 2 22 28 AM

return this.pantriesService.findOne(pantryId);
}

@Get('/orders/:pantryId')

Choose a reason for hiding this comment

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

Overall look great! I know we have a lot of things with testing up in the air, but can we create a pantries.controller.spec.ts file and add just this route to it? The services we may need to rewrite, so let's hold off on those, but the controller should be simple enough that wec an write a test for just this one.

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