Added _last_inform timestamp to device
This commit is contained in:
1 parent
a4b30357e7
commit
2ace65d2ea
1 file changed
+4
-1
+4
-1
@@ -33,6 +33,9 @@ updateDevice = (deviceId, actions, callback) ->
|
|||||||
return
|
return
|
||||||
|
|
||||||
updates = {}
|
updates = {}
|
||||||
|
if actions.inform
|
||||||
|
updates['_last_inform'] = new Date(Date.now())
|
||||||
|
|
||||||
if actions.parameterValues?
|
if actions.parameterValues?
|
||||||
for p in actions.parameterValues
|
for p in actions.parameterValues
|
||||||
v = sanitize(p[0], p[1])
|
v = sanitize(p[0], p[1])
|
||||||
@@ -142,7 +145,7 @@ else
|
|||||||
util.log("#{deviceId}: Added init task #{task._id}")
|
util.log("#{deviceId}: Added init task #{task._id}")
|
||||||
)
|
)
|
||||||
|
|
||||||
updateDevice(deviceId, {'parameterValues' : reqParams.informParameterValues}, (err) ->
|
updateDevice(deviceId, {'inform' : true, 'parameterValues' : reqParams.informParameterValues}, (err) ->
|
||||||
tr069.response(reqParams.sessionId, response, resParams, cookies)
|
tr069.response(reqParams.sessionId, response, resParams, cookies)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user