Remove Spree.user_class

This construct was previously used in Spree to switch out the user class with a dummy class during certain tests. We don't use this any more, so it's just mess.

🔥
This commit is contained in:
Matt-Yorkley
2021-12-10 18:18:20 +00:00
parent 215d8fc86e
commit 6d2521bf5f
17 changed files with 24 additions and 39 deletions

View File

@@ -52,11 +52,11 @@ module Api
if api_key.blank?
# An anonymous user
@current_api_user = Spree.user_class.new
@current_api_user = Spree::User.new
return
end
return if @current_api_user = Spree.user_class.find_by(spree_api_key: api_key.to_s)
return if @current_api_user = Spree::User.find_by(spree_api_key: api_key.to_s)
invalid_api_key
end