Skip to content

Commit

Permalink
fix(lib): mongoose services mistake ... exhausted O.O 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil committed Jun 18, 2020
1 parent 1fd4663 commit a5da7be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/services/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module.exports.connect = () => new Promise((resolve, reject) => {
if (mongoOptions.sslCert) mongoOptions.sslCert = fs.readFileSync(mongoOptions.sslCert);
if (mongoOptions.sslKey) mongoOptions.sslKey = fs.readFileSync(mongoOptions.sslKey);

if ((mongoOptions.ssl) === 'string') mongoOptions.ssl = (mongoOptions.ssl === 'true');
if ((mongoOptions.sslValidate) === 'string') mongoOptions.sslValidate = (mongoOptions.sslValidate === 'true');
if ((mongoOptions.checkServerIdentity) === 'string') mongoOptions.checkServerIdentity = (mongoOptions.checkServerIdentity === 'true');
if (typeof mongoOptions.ssl === 'string') mongoOptions.ssl = (mongoOptions.ssl === 'true');
if (typeof mongoOptions.sslValidate === 'string') mongoOptions.sslValidate = (mongoOptions.sslValidate === 'true');
if (typeof mongoOptions.checkServerIdentity === 'string') mongoOptions.checkServerIdentity = (mongoOptions.checkServerIdentity === 'true');

return mongoose
.connect(config.db.uri, mongoOptions)
Expand Down

0 comments on commit a5da7be

Please sign in to comment.