From 6d49d83ea7904ab7b158690acec9f454484ae40c Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 1 Aug 2025 23:25:36 +0300 Subject: [PATCH] update List.lua --- com/List.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/com/List.lua b/com/List.lua index 547a9b5..9b161da 100644 --- a/com/List.lua +++ b/com/List.lua @@ -1,7 +1,9 @@ -- com/List.lua -if In.Params and In.Params.about then - Out.Result = { +local session = require("session") + +if session.request and session.request.params and session.request.params.about then + session.response.result = { description = "Returns a list of available methods", params = { layer = "select which layer list to display" @@ -46,8 +48,8 @@ local function scanDirectory(basePath, targetPath) end 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, "") } \ No newline at end of file