cosmetics
This commit is contained in:
@@ -22,6 +22,7 @@ module Users
|
||||
|
||||
def show
|
||||
list = List.find(params[:id])
|
||||
render json: {}, status: :not_found and return unless list.present? && Array.wrap(list.user_ids).include?(current_user.id)
|
||||
[list].include_relation(supplier: {product_categories: :products}, orders: :product_orders) # table also when it is a real array :)
|
||||
render json: list, serializer: UserExtendedListSerializer
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user