From e4985a9d51d70f5bb9301fe95c9b4d2a8ccf2533 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 22 Apr 2020 12:38:13 +0200 Subject: [PATCH] Avoid needlessly fetching the current user records (for authentication and API key checks) These endpoints are absolutely public, and don't need the current user at any point. --- app/controllers/api/order_cycles_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/order_cycles_controller.rb b/app/controllers/api/order_cycles_controller.rb index b06f302169..5404db76c4 100644 --- a/app/controllers/api/order_cycles_controller.rb +++ b/app/controllers/api/order_cycles_controller.rb @@ -4,6 +4,7 @@ module Api respond_to :json skip_authorization_check + skip_before_filter :authenticate_user, :ensure_api_key, only: [:taxons, :properties] def products render_no_products unless order_cycle.open?