Upgrade to github gems and add jsonapi suppliers endpoint for user app
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
module Users
|
||||
class SuppliersController < Users::ApplicationController
|
||||
|
||||
def show
|
||||
@supplier = Supplier.find(params[:id])
|
||||
render json: {}, status: :not_found and return unless @supplier.present?
|
||||
render json: @supplier, include: %w[
|
||||
product_categories
|
||||
product_categories.products
|
||||
product_categories.products.product_variants
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user