diff --git a/src/util/response.lua b/src/util/response.lua index d99c002..99d9b69 100644 --- a/src/util/response.lua +++ b/src/util/response.lua @@ -7,6 +7,7 @@ local _M = {} function _M:json(status, message, data, http_status) -- you can modify this response struct as you favor + if status == 0 then status = ngx.ok end local msg = message local response_status = http_status or ngx.OK if msg == nil or msg == '' then diff --git a/src/util/status.lua b/src/util/status.lua index 15499a1..343c4db 100644 --- a/src/util/status.lua +++ b/src/util/status.lua @@ -18,7 +18,7 @@ --ngx.HTTP_GATEWAY_TIMEOUT (504) return { -- 系统状态码 - [0x000000] = 'ok', + [0x0000C8] = 'ok', [0x000001] = '验证错误', [0x000002] = '系统错误', [0x000003] = '系统异常',