Skip to content

Commit

Permalink
consolidated config defaults for db
Browse files Browse the repository at this point in the history
  • Loading branch information
timgit committed Oct 17, 2017
1 parent 47577c3 commit 8b95d11
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/attorney.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,9 @@ function applyConfig(config) {
}

function applyDatabaseConfig(config) {
if(typeof config === 'string') {
return {
connectionString: config,
schema: 'pgboss',
poolSize: 10
};
}

if(typeof config === 'string')
config = {connectionString: config};

if (typeof (config.connectionString) !== 'string') {
assert(config.database && config.user && 'password' in config,
Expand Down

0 comments on commit 8b95d11

Please sign in to comment.