mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2025-01-31 13:25:09 +01:00
When the status isn't "success" the status and the msg is now logged in wifibox.log. Fixing #140
This commit is contained in:
parent
7488c3a04c
commit
5c7b1dee10
@ -5,7 +5,9 @@
|
||||
local JSON = require('util/JSON')
|
||||
local settings = require('util.settings')
|
||||
local defaults = require('conf_defaults')
|
||||
|
||||
local utils = require('util.utils')
|
||||
local log = require('util.logger')
|
||||
|
||||
local M = {}
|
||||
M.__index = M
|
||||
|
||||
@ -121,8 +123,6 @@ end
|
||||
|
||||
--- Call all function on the post-response queue, see @{M:addPostResponseFunction} for details and a side-note.
|
||||
function M:executePostResponseQueue()
|
||||
--local utils = require('util.utils')
|
||||
--local log = require('util.logger')
|
||||
--log:info("Response:executePostResponseQueue: " .. utils.dump(self.postResponseQueue))
|
||||
|
||||
for i,fn in ipairs(self.postResponseQueue) do fn() end
|
||||
@ -159,6 +159,10 @@ function M:send()
|
||||
io.write("\r\n")
|
||||
io.write(self.binaryData)
|
||||
end
|
||||
|
||||
if self.body.status ~= "success" then
|
||||
log:debug("Response:"..utils.dump(self.body.status).." ("..utils.dump(self.body.msg)..")")
|
||||
end
|
||||
end
|
||||
|
||||
--- Sets the response object to return binary data instead of JSON as its body.
|
||||
|
Loading…
x
Reference in New Issue
Block a user