mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
Write the registered_at
time to config.json as well, in case there is a failure between writing to config.json and writing to knex [Page]
This commit is contained in:
parent
f03df0b4ad
commit
4003bd4828
@ -1,3 +1,5 @@
|
||||
* Write the `registered_at` time to config.json as well, in case there is a failure between writing to config.json and writing to knex [Page]
|
||||
|
||||
# v0.0.14
|
||||
|
||||
* Clean up tmp files left behind by npm [Page]
|
||||
|
@ -37,6 +37,7 @@ module.exports = ->
|
||||
registerDevice(userConfig.apiKey, userConfig.userId, userConfig.applicationId, userConfig.deviceType, userConfig.uuid)
|
||||
.then (device) ->
|
||||
userConfig.uuid = device.uuid
|
||||
userConfig.registered_at = Date.now()
|
||||
userConfig.deviceId = device.id
|
||||
fs.writeFileAsync('/boot/config.json', JSON.stringify(userConfig))
|
||||
.return(userConfig)
|
||||
|
Loading…
Reference in New Issue
Block a user