mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 07:12:26 +00:00
add headers lua runtime support
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
local session = require("internal.session")
|
||||
|
||||
if session.request.params.about then
|
||||
local params = session.request.params.get()
|
||||
|
||||
if params.about then
|
||||
session.response.result = {
|
||||
description = "Returns a list of available methods",
|
||||
params = {
|
||||
@@ -48,7 +50,7 @@ local function scanDirectory(basePath, targetPath)
|
||||
end
|
||||
|
||||
local basePath = "com"
|
||||
local layer = session.request and session.request.params.layer and session.request.params.layer:gsub(">", "/") or nil
|
||||
local layer = params.layer and params.layer:gsub(">", "/") or nil
|
||||
|
||||
session.response.result = {
|
||||
answer = layer and scanDirectory(basePath, layer) or scanDirectory(basePath, "")
|
||||
|
||||
Reference in New Issue
Block a user