Skip to content

Commit

Permalink
collection.remove is deprecated.
Browse files Browse the repository at this point in the history
Use .deleteMany instead.

Fixes: powmedia#34
  • Loading branch information
markstos committed Dec 31, 2019
1 parent 29e4ff3 commit 3d7ba23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongoose_fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function insertCollection(modelName, data, db, callback) {
var Model = db.model(modelName);

//Clear existing collection
Model.collection.remove(function(err) {
Model.collection.deleteMany(function(err) {
if (err) return callback(err);

//Convert object to array
Expand Down

0 comments on commit 3d7ba23

Please sign in to comment.