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:
parent
7de2e2aed0
commit
e056e4e936
@ -152,7 +152,8 @@ function M.install_POST(request, response)
|
|||||||
local argVersion = request:get("version")
|
local argVersion = request:get("version")
|
||||||
local argNoRetain = request:get("no_retain")
|
local argNoRetain = request:get("no_retain")
|
||||||
log:info("API:update/install (noRetain: "..utils.dump(argNoRetain)..")")
|
log:info("API:update/install (noRetain: "..utils.dump(argNoRetain)..")")
|
||||||
|
local noRetain = argNoRetain == 'true'
|
||||||
|
|
||||||
if not operationsAccessOrFail(request, response) then return end
|
if not operationsAccessOrFail(request, response) then return end
|
||||||
|
|
||||||
updater.setLogger(log)
|
updater.setLogger(log)
|
||||||
@ -183,7 +184,7 @@ function M.install_POST(request, response)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local rv,msg = updater.flashImageVersion(vEnt, argNoRetain)
|
local rv,msg = updater.flashImageVersion(vEnt, noRetain)
|
||||||
|
|
||||||
if not rv then
|
if not rv then
|
||||||
updater.setState(updater.STATE.INSTALL_FAILED, "installation failed (" .. msg .. ")")
|
updater.setState(updater.STATE.INSTALL_FAILED, "installation failed (" .. msg .. ")")
|
||||||
|
Loading…
Reference in New Issue
Block a user