-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-114] Remove Order–Pantry Relationship #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
dburkhart07
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small things ☕
dburkhart07
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 very small things. Also, while we are at it, since we are rewriting this relationship, could we slightly restructure the getAllOrders controller test? Just making it so that the mockOrders actually follow the new relationship (they should contain a partial request that contains a partial pantry that contains a pantry name).
| 'order.createdAt', | ||
| 'order.shippedAt', | ||
| 'order.deliveredAt', | ||
| 'request.pantryId', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already return the pantryId below, so we should get rid of one of these. I'm more in favor of getting rid of pantry.pantryId and keeping the request.pantryId.
|
|
||
| @ManyToOne(() => Pantry, { nullable: false }) | ||
| @JoinColumn({ name: 'pantry_id', referencedColumnName: 'pantryId' }) | ||
| pantry: Pantry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change the frontend type too with adding this.
ℹ️ Issue
Closes SSF-114
📝 Description
✔️ Verification
Make sure all tests passed and verified updated endpoints on Postman.
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!