mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
bw - add missing json decode in api and add missing require in country
This commit is contained in:
parent
83428d6ccf
commit
bcc5e6bb50
2 changed files with 2 additions and 0 deletions
|
|
@ -188,6 +188,7 @@ function api:do_api_call()
|
|||
local status, resp = self:response(ngx.HTTP_INTERNAL_SERVER_ERROR, "error", "can't list loaded plugins : " .. err)
|
||||
return false, resp["msg"], ngx.HTTP_INTERNAL_SERVER_ERROR, resp
|
||||
end
|
||||
list = cjson.decode(list)
|
||||
for i, plugin in ipairs(list) do
|
||||
if pcall(require, plugin.id .. "/" .. plugin.id) then
|
||||
local plugin_lua = require(plugin.id .. "/" .. plugin.id)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ local class = require "middleclass"
|
|||
local plugin = require "bunkerweb.plugin"
|
||||
local utils = require "bunkerweb.utils"
|
||||
local cachestore = require "bunkerweb.cachestore"
|
||||
local cjson = require "cjson"
|
||||
|
||||
local country = class("country", plugin)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue