From 81520a3aab25e9dc1e243a4f51515b58b2de173e Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 9 Feb 2015 16:56:29 +0000 Subject: [PATCH] fix indentation --- database.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/database.js b/database.js index 9f2489b..99838e9 100644 --- a/database.js +++ b/database.js @@ -15,19 +15,19 @@ var DatabaseDriver = function(config) { * Connect to or create a new DataBank */ DatabaseDriver.prototype.createDB = function(name, driver, schema, callback) { - var params = { 'schema': schema }; + var params = { 'schema': schema }; - if(driver == 'redis' && _.has(this.config, 'redisPort')) params.port = this.config.redisPort; - if(driver == 'disk') params.dir = 'db'; + if(driver == 'redis' && _.has(this.config, 'redisPort')) params.port = this.config.redisPort; + if(driver == 'disk') params.dir = 'db'; - this.databank = Databank.get(driver, params); - this.databank.connect({}, function(err) { - if(err) { - console.log('Didn\'t manage to connect to the data source - ' + err); - } else { - callback(this.databank); - } - }.bind(this)); + this.databank = Databank.get(driver, params); + this.databank.connect({}, function(err) { + if(err) { + console.log('Didn\'t manage to connect to the data source - ' + err); + } else { + callback(this.databank); + } + }.bind(this)); }; exports.DatabaseDriver = DatabaseDriver;