antos-backend/controllers/IndexController.lua
DanyLE ac36ba6ff0
All checks were successful
gitea-sync/antos-backend/pipeline/head This commit looks good
feat: add versions info to API
2024-03-17 21:11:37 +01:00

32 lines
672 B
Lua

BaseController:subclass(
"IndexController",
{
registry = {},
models = {}
}
)
function IndexController:actionnotfound(...)
return self:index(table.unpack({...}))
end
function IndexController:index(...)
html()
std.f(WWW_ROOT..DIR_SEP.."index.html")
end
function IndexController:doc(...)
local api = {
author = "Xuan Sang LE",
email = "xsang.le@gmail.com",
api_name = "AntOS API",
version = API_VERSION,
documents = {
vfs = HTTP_ROOT.."/VFS",
user = HTTP_ROOT.."/user",
system = HTTP_ROOT.."/system"
}
}
result(api)
return false
end