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)
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue