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.
This commit is contained in:
Matt-Yorkley
2020-04-22 12:38:13 +02:00
parent eb7de18298
commit e4985a9d51

View File

@@ -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?