Skip to content

Commit

Permalink
Remove MongoDB unified topology deprecation notice from the grid adap…
Browse files Browse the repository at this point in the history
…ters (#5941)
  • Loading branch information
davimacedo authored Aug 19, 2019
1 parent 1064f0c commit f25a846
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Adapters/Files/GridFSBucketAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export class GridFSBucketAdapter extends FilesAdapter {
super();
this._databaseURI = mongoDatabaseURI;

const defaultMongoOptions = { useNewUrlParser: true };
const defaultMongoOptions = {
useNewUrlParser: true,
useUnifiedTopology: true,
};
this._mongoOptions = Object.assign(defaultMongoOptions, mongoOptions);
}

Expand Down
5 changes: 4 additions & 1 deletion src/Adapters/Files/GridStoreAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export class GridStoreAdapter extends FilesAdapter {
super();
this._databaseURI = mongoDatabaseURI;

const defaultMongoOptions = { useNewUrlParser: true };
const defaultMongoOptions = {
useNewUrlParser: true,
useUnifiedTopology: true,
};
this._mongoOptions = Object.assign(defaultMongoOptions, mongoOptions);
}

Expand Down

0 comments on commit f25a846

Please sign in to comment.