Fix linter

This commit is contained in:
Alex Ling 2021-01-17 08:25:01 +00:00
parent 7d6d3640ad
commit e4587d36bc
2 changed files with 5 additions and 3 deletions

View File

@ -84,8 +84,8 @@ class AuthHandler < Kemal::Handler
end
if should_reject
env.response.status_code = 403
message = "HTTP 403: You are not authorized to visit #{env.request.path}"
send_error_page
send_error_page "HTTP 403: You are not authorized to visit " \
"#{env.request.path}"
return
end
end

View File

@ -1,5 +1,6 @@
# Web related helper functions/macros
# This macro defines `is_admin` when used
macro check_admin_access
is_admin = false
# The token (if exists) takes precedence over the default user option.
@ -28,7 +29,8 @@ macro layout(name)
end
end
macro send_error_page
macro send_error_page(msg)
message = {{msg}}
base_url = Config.current.base_url
check_admin_access
page = "Error"