style(ntfy): fix bracket-spacing lint offenses
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
module Admin
|
||||
class SessionsController < ActionController::Base
|
||||
include AdminAuthentication
|
||||
|
||||
layout "admin"
|
||||
|
||||
# CSRF protection is enabled by default in ActionController::Base
|
||||
# We need it for the create action but not for the new (GET) action
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
helper_method :current_admin, :logged_in?
|
||||
|
||||
def new
|
||||
redirect_to admin_dashboard_path if current_admin
|
||||
end
|
||||
@@ -27,12 +31,5 @@ module Admin
|
||||
session.delete(:admin_id)
|
||||
redirect_to admin_login_path, notice: "You have been logged out"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_admin
|
||||
@current_admin ||= AdminUser.find_by(id: session[:admin_id]) if session[:admin_id]
|
||||
end
|
||||
helper_method :current_admin
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user