Refactor login code
Error message for the login page is optional now.
This commit is contained in:
parent
4e3bd03af4
commit
fee8997e80
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue