Update login UI

This commit is contained in:
Daniel Nitsikopoulos
2024-09-29 22:26:56 +10:00
parent a9e1c4bf60
commit 4d4758c6cd
3 changed files with 8 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ module Adamantium
def call(env)
session = env["rack.session"]
return [403, {"Content-Type" => "text/html"}, ["Unauthorized | <a href=\"/admin/login\">Login</>"]] unless @auth_proc.call(session[:user_id])
return [302, {"Location" => "/admin/login"}, []] unless @auth_proc.call(session[:user_id])
@app.call(env)
end