Mostly enriching supplier's user info with number of lists finished at the restaurant
This commit is contained in:
@@ -19,7 +19,8 @@ module Suppliers
|
||||
else
|
||||
@lists = List.for_supplier(current_supplier, page: params[:page], per_page: params[:per_page] || 25)
|
||||
end
|
||||
@lists.include_relation(:table, :users, orders: {user: nil, product_orders: :product})
|
||||
@lists.include_relations(:table, :users, orders: {user: nil, product_orders: :product})
|
||||
List.enrich_users_number_of_lists_at_supplier current_supplier.id, @lists
|
||||
|
||||
render json: @lists, include: %w[
|
||||
orders
|
||||
|
||||
Reference in New Issue
Block a user