Use logged in user (spree_current_user) for API authentication (current_api_user)

This commit is contained in:
Hugo Daniel
2018-11-09 17:49:23 +01:00
parent 57efc36448
commit 3dd981ca05

View File

@@ -13,5 +13,13 @@ module Api
def respond_with_conflict(json_hash)
render json: json_hash, status: :conflict
end
private
# Use logged in user (spree_current_user) for API authentication (current_api_user)
def authenticate_user
@current_api_user = try_spree_current_user
super
end
end
end