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:
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user