1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-29 02:38:22 +01:00
antd-web-apps/info/controllers/UserController.lua

17 lines
331 B
Lua
Raw Normal View History

2018-08-28 10:49:12 +02:00
BaseController:subclass(
"UserController",
{
models = {"user"}
}
)
function UserController:index(...)
local args = {...}
local data = self.user:findAll()
2018-08-28 10:49:12 +02:00
if not data or not data[1] then
self:error("Cannot fetch user info")
end
self.template:set("data", data[1])
return true
2018-08-28 10:49:12 +02:00
end