Skip to content

Commit

Permalink
Lint Correction
Browse files Browse the repository at this point in the history
Co-Authored-By: Elia Schito <elia@schito.me>
  • Loading branch information
cpfergus1 and elia committed Sep 23, 2022
1 parent 093f9b9 commit 2f9b1f6
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
else
elsif Spree::Auth::Engine.redirect_back_on_unauthorized?

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_back(fallback_location: spree.admin_login_path)
else
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
else
elsif Spree::Auth::Engine.redirect_back_on_unauthorized?

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

0 comments on commit 2f9b1f6

Please sign in to comment.