0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

Properly handling API:update/install no_retain argument

This commit is contained in:
peteruithoven 2013-12-23 23:24:31 +01:00
parent 7de2e2aed0
commit e056e4e936

View File

@ -152,7 +152,8 @@ function M.install_POST(request, response)
local argVersion = request:get("version")
local argNoRetain = request:get("no_retain")
log:info("API:update/install (noRetain: "..utils.dump(argNoRetain)..")")
local noRetain = argNoRetain == 'true'
if not operationsAccessOrFail(request, response) then return end
updater.setLogger(log)
@ -183,7 +184,7 @@ function M.install_POST(request, response)
return
end
local rv,msg = updater.flashImageVersion(vEnt, argNoRetain)
local rv,msg = updater.flashImageVersion(vEnt, noRetain)
if not rv then
updater.setState(updater.STATE.INSTALL_FAILED, "installation failed (" .. msg .. ")")