Don't let the bootstrap delete apiSecret from DB

This commit is contained in:
Pablo Carranza Vélez 2015-10-08 20:17:29 +00:00
parent b57dd10e81
commit 7eb17bd79b
2 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
* Don't allow bootstrap to delete apiSecret from DB [Pablo]
* Add API endpoint to expire and create new API key [Pablo]
* Enable control of API poll interval through Device Variables [Praneeth]
* Allow control of VPN + TCP check + Pub nub logs with Device Environment variables [Praneeth]

View File

@ -53,7 +53,7 @@ bootstrap = ->
.then (userConfig) ->
console.log('Finishing bootstrapping')
Promise.all([
knex('config').truncate()
knex('config').whereIn('key', ['uuid', 'apiKey', 'username', 'userId', 'version']).delete()
.then ->
knex('config').insert([
{ key: 'uuid', value: userConfig.uuid }