mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 10:18:21 +01:00
14 lines
339 B
Lua
14 lines
339 B
Lua
|
UserController = BaseController:extends{
|
||
|
class = "UserController",
|
||
|
models = {"user"}
|
||
|
}
|
||
|
|
||
|
function UserController:index(...)
|
||
|
local args = {...}
|
||
|
local data = self.user:findAll()
|
||
|
if not data or not data[1] then
|
||
|
self:error("Cannot fetch user info")
|
||
|
end
|
||
|
self.template:set("data", data[1])
|
||
|
return true
|
||
|
end
|