Skip to content

Commit

Permalink
Merge pull request #47 from tiago-marques/master
Browse files Browse the repository at this point in the history
Update Dependencies
  • Loading branch information
saintedlama committed Aug 10, 2018
2 parents d59d101 + e32fc16 commit 88262d9
Show file tree
Hide file tree
Showing 5 changed files with 2,419 additions and 1,561 deletions.
2 changes: 1 addition & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var mongoose = require('mongoose');
var restifyMongoose = require('../index.js');
var models = require('./models');

mongoose.connect('mongodb://localhost/restify-mongoose-examples');
mongoose.connect('mongodb://localhost/restify-mongoose-examples', { useNewUrlParser: true });

var server = restify.createServer({
name: 'restify.mongoose.examples.notes',
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const restifyError = function (err) {
});

returnError.toJSON = function () {
return Object.assign({}, this.body, { errors: err.errors });
return Object.assign({}, this.body, { errors: err.errors });
};

return returnError;
Expand Down Expand Up @@ -54,7 +54,7 @@ const execQueryWithTotCount = function (query, countQuery) {
query.exec(callback);
},
count: function (callback) {
countQuery.count(callback);
countQuery.countDocuments(callback);
}
},
function (err, results) {
Expand Down

0 comments on commit 88262d9

Please sign in to comment.