mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix bw api not returning the reason of bans
This commit is contained in:
parent
7ac66a6c65
commit
f4ce2c68f2
1 changed files with 3 additions and 3 deletions
|
|
@ -178,10 +178,10 @@ api.global.GET["^/bans$"] = function(self)
|
|||
local data = {}
|
||||
for i, k in ipairs(self.datastore:keys()) do
|
||||
if k:find("^bans_ip_") then
|
||||
local ret, reason = self.datastore:get(k)
|
||||
if not ret then
|
||||
local reason, err = self.datastore:get(k)
|
||||
if err then
|
||||
return self:response(ngx.HTTP_INTERNAL_SERVER_ERROR, "error",
|
||||
"can't access " .. k .. " from datastore : " + reason)
|
||||
"can't access " .. k .. " from datastore : " .. reason)
|
||||
end
|
||||
local ok, ttl = self.datastore:ttl(k)
|
||||
if not ok then
|
||||
|
|
|
|||
Loading…
Reference in a new issue