Open dimidev opened 1 year ago
At the moment I am not using the API myself, I am using the legacy frontend. Due to time limitations I can't look into it myself, but if you manage to fix it I will be happy to merge it in. It seems like the way the API is finding the project bypasses the slug translations. Probably the cause is in the code of spree api and need to be fixed either by decorator or suggesting a PR to spree team in the api (they can be quite slow in my experience, but worth a try).
I will compare it to spree globalize and friendly-id globalize if i can find any solution from there.
i'm using spree 4.3.2 with this gems. Backend working fine with fallback, but on API it doesn't work
Gemfile
mobility.rb
For example i have a product with both data on english and greek language. The product have only one slug with locale el (greek) en is empty, when i call http://localhost:4000/api/v2/storefront/products/product1?locale=el it returns the result. But when i use ?locale=en the result is "The resource you were looking for could not be found."
When i use cli i get proper results