style(ntfy): fix bracket-spacing lint offenses

This commit is contained in:
Min Zeya Phyo
2026-07-28 02:34:26 +08:00
parent 20927eea5f
commit ac2054e45c
13 changed files with 1502 additions and 70 deletions

View File

@@ -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