Merge pull request #4101 from luisramos0/remove_variants_rabl

Convert spree/api/products and spree/api/variants views from rabl to AMS
This commit is contained in:
Pau Pérez Fabregat
2019-09-02 12:14:26 +02:00
committed by GitHub
17 changed files with 650 additions and 925 deletions

View File

@@ -1,5 +1,20 @@
Openfoodnetwork::Application.routes.draw do
namespace :api do
resources :products do
collection do
get :bulk_products
get :overridable
end
delete :soft_delete
post :clone
resources :variants do
delete :soft_delete
end
end
resources :variants, :only => [:index]
resources :enterprises do
post :update_image, on: :member
get :managed, on: :collection

View File

@@ -62,22 +62,6 @@ Spree::Core::Engine.routes.prepend do
get :authorise_api, on: :collection
end
resources :products do
collection do
get :managed
get :bulk_products
get :overridable
end
delete :soft_delete
post :clone
resources :variants do
delete :soft_delete
end
end
resources :variants, :only => [:index]
resources :orders do
get :managed, on: :collection