mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-07-17 06:09:50 +02:00
fix info
This commit is contained in:
@ -58,9 +58,9 @@ function IndexController:pdf(...)
|
||||
if r then
|
||||
local mime = std.mimeOf(tmp_file)
|
||||
std.header(mime)
|
||||
std.fb(tmp_file)
|
||||
std.f(tmp_file)
|
||||
return false
|
||||
else
|
||||
return self:error("Sorry.Problem generate PDF file")
|
||||
end
|
||||
end
|
||||
end
|
@ -54,6 +54,18 @@ local default_routes_dependencies = {
|
||||
}
|
||||
}
|
||||
router:route('default', default_routes_dependencies )
|
||||
|
||||
BaseController:subclass("NotfoundController",{ registry = {}, models = {} })
|
||||
|
||||
function NotfoundController:index(...)
|
||||
local args = {...}
|
||||
local user = args[1]:gsub("Controller", ""):lower();
|
||||
REQUEST.r = "index"
|
||||
if REGISTRY.db then REGISTRY.db:close() end
|
||||
REGISTRY.db = DBHelper:new{db = user}
|
||||
REGISTRY.db:open()
|
||||
router:delegate()
|
||||
end
|
||||
router:delegate()
|
||||
if REGISTRY.db then REGISTRY.db:close() end
|
||||
|
||||
|
Reference in New Issue
Block a user