Skip to content
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

fixed product reviews by product code route by api convention #449

Merged
merged 6 commits into from
Jun 9, 2019

Conversation

antonioperic
Copy link
Contributor

No description provided.

@antonioperic antonioperic requested a review from a team as a code owner June 8, 2019 12:59
@mamazu
Copy link
Member

mamazu commented Jun 8, 2019

Thank you for your contribution and welcome to the community. Your pull request looks great.
Could you please add an entry to the UPGRADE.md file for the changes? This would provide a good way to notice the route changes when upgrading.

@@ -21,3 +9,15 @@ sylius_shop_api_add_product_review_by_code:
methods: [POST]
defaults:
_controller: sylius.shop_api_plugin.controller.product.add_review_by_code_action

Copy link
Member

Choose a reason for hiding this comment

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

Why was that moved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/reviews is more specific route so it is moved on top, cause in some situaion routing can consider /reviews as part of slug/code
in this situation that will never happen
and also it is better/faster to have more specific routes on top

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that makes sense.

@mamazu mamazu merged commit 1ecf970 into Sylius:master Jun 9, 2019
@mamazu
Copy link
Member

mamazu commented Jun 9, 2019

Thank you, Antonio! 🎉

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