updates based on F5 testing
This commit is contained in:
@@ -4,10 +4,16 @@ module Users
|
||||
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
|
||||
render json: @supplier
|
||||
end
|
||||
|
||||
def product_categories
|
||||
@supplier = Supplier.find(params[:id])
|
||||
render json: {}, status: :not_found and return unless @supplier.present?
|
||||
@supplier.product_categories.include_relations products: :product_variants
|
||||
render json: @supplier.product_categories, serializer: Users::ProductCategorySerializer, is_collection: true, include: %w[
|
||||
products
|
||||
products.product_variants
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user