From 94395c7e120665056a2611300d171e6ff0dc8b0f Mon Sep 17 00:00:00 2001 From: Petros Aggelatos Date: Tue, 31 Dec 2013 06:41:05 +0000 Subject: [PATCH] Bugfix. .then() expects a function --- src/bootstrap.coffee | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bootstrap.coffee b/src/bootstrap.coffee index 0bbadebd..d5a217f3 100644 --- a/src/bootstrap.coffee +++ b/src/bootstrap.coffee @@ -58,13 +58,15 @@ module.exports = (uuid) -> ).then(-> console.log('Finishing bootstrapping') Promise.all([ - knex('config').truncate().then(config).then((config) -> - knex('config').insert([ - {key: 'uuid', value: uuid} - {key: 'apiKey', value: config.apiKey} - {key: 'username', value: config.username} - {key: 'userId', value: config.userId} - ]) + knex('config').truncate().then(-> + config.then((config) -> + knex('config').insert([ + {key: 'uuid', value: uuid} + {key: 'apiKey', value: config.apiKey} + {key: 'username', value: config.username} + {key: 'userId', value: config.userId} + ]) + ) ) knex('app').truncate() ])