Tidy up Api::OrderController#index

This commit is contained in:
Matt-Yorkley
2021-01-05 21:08:02 +00:00
parent fe0a0395d8
commit 540aa913a3

View File

@@ -10,9 +10,7 @@ module Api
def index
authorize! :admin, Spree::Order
search_results = SearchOrders.new(params, current_api_user)
orders = search_results.orders
orders = SearchOrders.new(params, current_api_user).orders
render json: {
orders: serialized_orders(orders),