Skip to content

Commit

Permalink
BC-6101 - fix mongoose connection (#4661)
Browse files Browse the repository at this point in the history
  • Loading branch information
virgilchiriac committed Dec 21, 2023
1 parent 7867efa commit 061710d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/utils/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const encodeMongoURI = (urlString) => {
function addAuthenticationToMongooseOptions(username, password, mongooseOptions) {
const auth = {};
if (username) {
auth.user = username;
auth.username = username;
}
if (password) {
auth.password = password;
Expand Down Expand Up @@ -78,13 +78,7 @@ function connect() {
mongoose.Promise = global.Promise;
const options = getConnectionOptions();

logger.info(
'connect to database host',
options.url,
options.username ? `with username ${options.username}` : 'without user',
options.password ? 'and' : 'and without',
'password'
);
logger.info('connect to database host');

const mongooseOptions = {
autoIndex: NODE_ENV !== ENVIRONMENTS.PRODUCTION,
Expand Down

0 comments on commit 061710d

Please sign in to comment.