update List.lua

This commit is contained in:
2025-08-01 23:25:36 +03:00
parent fb04b3bc46
commit 6d49d83ea7

View File

@@ -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, "")
} }