Skip to content

Commit

Permalink
Lint Correction
Browse files Browse the repository at this point in the history
Co-Authored-By: Elia Schito <[email protected]>
  • Loading branch information
cpfergus1 and elia committed Sep 30, 2022
1 parent da9d5cd commit c38010d
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions lib/spree/auth/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ def self.prepare_backend
else
redirect_to spree.admin_unauthorized_path
end
elsif Spree::Auth::Engine.redirect_back_on_unauthorized?
store_spree_user_location!
redirect_back(fallback_location: spree.admin_login_path)
else

if Spree::Auth::Engine.redirect_back_on_unauthorized?
redirect_back(fallback_location: spree.admin_login_path)
else
redirect_to spree.admin_login_path
end
redirect_to spree.admin_login_path
end
end
end
Expand All @@ -79,13 +77,11 @@ def self.prepare_frontend
else
redirect_to spree.unauthorized_path
end
elsif Spree::Auth::Engine.redirect_back_on_unauthorized?
store_spree_user_location!
redirect_back(fallback_location: spree.login_path)
else

if Spree::Auth::Engine.redirect_back_on_unauthorized?
redirect_back(fallback_location: spree.login_path)
else
redirect_to spree.login_path
end
redirect_to spree.login_path
end
end
end
Expand Down

0 comments on commit c38010d

Please sign in to comment.