Skip to content

Commit

Permalink
fix limit aricles
Browse files Browse the repository at this point in the history
  • Loading branch information
maryan-mandzyuk committed Jul 28, 2019
1 parent c79dc6e commit 495170e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/models/article.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = {
}
ArticleModel.find(query).sort({
createDate: -1
}).limit(req.query.limit).exec((err, data) => {
}).limit(parseInt(req.query.limit, 10)).exec((err, data) => {
if (!err) {
callback(data);
} else {
Expand Down

0 comments on commit 495170e

Please sign in to comment.