mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 10:46:22 +00:00
Merge pull request #303 from resin-io/cleanup
Remove unnecessary Promise.all
This commit is contained in:
commit
3a2ec489b8
@ -50,17 +50,15 @@ bootstrap = ->
|
||||
.return(userConfig)
|
||||
.then (userConfig) ->
|
||||
console.log('Finishing bootstrapping')
|
||||
Promise.all([
|
||||
knex('config').whereIn('key', ['uuid', 'apiKey', 'username', 'userId', 'version']).delete()
|
||||
.then ->
|
||||
knex('config').insert([
|
||||
{ key: 'uuid', value: userConfig.uuid }
|
||||
{ key: 'apiKey', value: userConfig.apiKey }
|
||||
{ key: 'username', value: userConfig.username }
|
||||
{ key: 'userId', value: userConfig.userId }
|
||||
{ key: 'version', value: utils.supervisorVersion }
|
||||
])
|
||||
])
|
||||
knex('config').whereIn('key', ['uuid', 'apiKey', 'username', 'userId', 'version']).delete()
|
||||
.then ->
|
||||
knex('config').insert([
|
||||
{ key: 'uuid', value: userConfig.uuid }
|
||||
{ key: 'apiKey', value: userConfig.apiKey }
|
||||
{ key: 'username', value: userConfig.username }
|
||||
{ key: 'userId', value: userConfig.userId }
|
||||
{ key: 'version', value: utils.supervisorVersion }
|
||||
])
|
||||
.tap ->
|
||||
bootstrapper.doneBootstrapping()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user