updates based on F5 testing

This commit is contained in:
2020-03-06 08:35:12 -05:00
parent 8288595b3f
commit f1ef618dae
18 changed files with 66 additions and 32 deletions
+10 -4
View File
@@ -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