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)
--Just give them the login page
local ret = cache.render(string.format("%s/_login",config.domain),function()
return pages.login{
err = "",
}
end)
local ret = cache.render(
string.format("%s/_login",config.domain),
function() return pages.login{} end
)
http_response(req,200,ret)
end