Update common.lua
This commit is contained in:
parent
444ff40570
commit
6555d927ea
|
|
@ -179,18 +179,13 @@ end
|
|||
|
||||
function _M.return_message(self, status, msg)
|
||||
ngx.header.content_type = "application/json"
|
||||
|
||||
self:D("return_message:"..tostring(status)..tostring(msg))
|
||||
local data = self:return_state(status, msg)
|
||||
|
||||
self:D("return_message[data]:"..tostring(data))
|
||||
ngx.say(json.encode(data))
|
||||
ngx.exit(200)
|
||||
end
|
||||
|
||||
function _M.return_html(self,status, html)
|
||||
function _M.return_html(self, status, html)
|
||||
ngx.header.content_type = "text/html"
|
||||
ngx.status = status
|
||||
ngx.say(html)
|
||||
ngx.exit(status)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue