1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-07-23 17:19:47 +02:00

support multi-user in info

This commit is contained in:
lxsang
2020-06-07 19:46:59 +02:00
parent 66bcfa83b0
commit d15ab7dfec
5 changed files with 17 additions and 14 deletions

View File

@ -52,8 +52,8 @@ function IndexController:actionnotfound(...)
end
function IndexController:pdf(...)
local tmp_file = WWW_ROOT.."/lxsang_cv.pdf"
local cmd = "wkhtmltopdf "..HTTP_ROOT.."/index/notoc "..tmp_file
local tmp_file = WWW_ROOT.."/cv_exported.pdf"
local cmd = "wkhtmltopdf "..HTTP_ROOT.."/"..self.registry.user.."/notoc "..tmp_file
local r = os.execute(cmd)
if r then
local mime = std.mimeOf(tmp_file)

View File

@ -11,6 +11,7 @@ function UserController:index(...)
if not data or not data[1] then
self:error("Cannot fetch user info")
end
data[1].user = self.registry.user
self.template:set("data", data[1])
return true
end