mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Make spree/api/products_controller work with AMS
This commit is contained in:
@@ -2,9 +2,11 @@ require 'open_food_network/permissions'
|
||||
|
||||
module Spree
|
||||
module Api
|
||||
class ProductsController < Spree::Api::BaseController
|
||||
class ProductsController < ::Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
skip_authorization_check only: [:show]
|
||||
|
||||
def show
|
||||
@product = find_product(params[:id])
|
||||
render json: @product, serializer: ::Api::Admin::ProductSerializer
|
||||
|
||||
Reference in New Issue
Block a user