From 540aa913a3552c454ceb3974be7863fd64dc15bd Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 5 Jan 2021 21:08:02 +0000 Subject: [PATCH] Tidy up Api::OrderController#index --- app/controllers/api/orders_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index b1cbf222f7..65176a0008 100644 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -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),