Refactor login code

Error message for the login page is optional now.
This commit is contained in:
Robin Malley 2023-04-06 20:20:29 +00:00
parent 4e3bd03af4
commit fee8997e80
1 changed files with 4 additions and 5 deletions

View File

@ -6,11 +6,10 @@ local pages = require("pages")
local function login_get(req) local function login_get(req)
--Just give them the login page --Just give them the login page
local ret = cache.render(string.format("%s/_login",config.domain),function() local ret = cache.render(
return pages.login{ string.format("%s/_login",config.domain),
err = "", function() return pages.login{} end
} )
end)
http_response(req,200,ret) http_response(req,200,ret)
end end