Files
mozo-backend/app/controllers/users/suppliers_controller.rb
T

15 lines
395 B
Ruby

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