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

Encountered 404 when accessing /api/products/:id/related(.:format) #12

Closed
zhuwu opened this issue Aug 12, 2016 · 3 comments
Closed

Encountered 404 when accessing /api/products/:id/related(.:format) #12

zhuwu opened this issue Aug 12, 2016 · 3 comments
Labels

Comments

@zhuwu
Copy link

zhuwu commented Aug 12, 2016

After this gem is installed, there is such an entry in the rake routs result:

related_api_product GET  /api/products/:id/related(.:format)  spree/api/products#related {:format=>"json"}

However, there is no such an action called related in Spree::Api::ProductsController. Thus, this URL always responses 404.

@graygilmore
Copy link
Contributor

The gem itself creates the #related action: https://github.com/solidusio-contrib/solidus_related_products/blob/master/app/controllers/spree/admin/products_controller_decorator.rb#L4

Can I see the code you are trying to use to hit the endpoint?

@zhuwu
Copy link
Author

zhuwu commented Aug 12, 2016

I was referring to /api/products/:id/related instead of /admin/products/:id/related. There is an action for /admin/products/:id/related, but there is no action for /api/products/:id/related.

@stale
Copy link

stale bot commented Jan 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 24, 2020
@stale stale bot closed this as completed Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants