mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-03-21 11:35:18 +00:00
Address style fixes in app.coffee
This commit is contained in:
parent
feb4d74d28
commit
e1957def25
@ -57,11 +57,10 @@ knex.init.then ->
|
||||
updateIpAddr = ->
|
||||
callback = (error, response, body ) ->
|
||||
if !error && response.statusCode == 200
|
||||
api_response = JSON.parse(body)
|
||||
device.updateState(
|
||||
ip_address: api_response.Status
|
||||
ip_address: body.Status
|
||||
)
|
||||
request.get(config.gosuperAddress + '/v1/ipaddr', callback )
|
||||
request.get({ url: "#{config.gosuperAddress}/v1/ipaddr", json: true }, callback )
|
||||
|
||||
console.log('Starting periodic check for IP addresses..')
|
||||
setInterval(updateIpAddr, 30 * 1000) # Every 30s
|
||||
|
Loading…
x
Reference in New Issue
Block a user