mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 19:32:26 +00:00
update List.lua
This commit is contained in:
10
com/List.lua
10
com/List.lua
@@ -1,7 +1,9 @@
|
|||||||
-- com/List.lua
|
-- com/List.lua
|
||||||
|
|
||||||
if In.Params and In.Params.about then
|
local session = require("session")
|
||||||
Out.Result = {
|
|
||||||
|
if session.request and session.request.params and session.request.params.about then
|
||||||
|
session.response.result = {
|
||||||
description = "Returns a list of available methods",
|
description = "Returns a list of available methods",
|
||||||
params = {
|
params = {
|
||||||
layer = "select which layer list to display"
|
layer = "select which layer list to display"
|
||||||
@@ -46,8 +48,8 @@ local function scanDirectory(basePath, targetPath)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local basePath = "com"
|
local basePath = "com"
|
||||||
local layer = In.Params and In.Params.layer and In.Params.layer:gsub(">", "/") or nil
|
local layer = session.request and session.request.params.layer and session.request.params.layer:gsub(">", "/") or nil
|
||||||
|
|
||||||
Out.Result = {
|
session.response.result = {
|
||||||
answer = layer and scanDirectory(basePath, layer) or scanDirectory(basePath, "")
|
answer = layer and scanDirectory(basePath, layer) or scanDirectory(basePath, "")
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user