Sort without old data
This commit is contained in:
parent
fb1c1ef2ae
commit
8ad7f0f6b0
1 changed files with 1 additions and 1 deletions
2
app.js
2
app.js
|
@ -60,7 +60,7 @@ app.get('*', function(req,res,next) {
|
|||
});
|
||||
|
||||
app.get('/', function(req, res) {
|
||||
req.db.matches.find().sort({created_at:-1}).limit(6).toArray().then(function(docs){
|
||||
req.db.matches.find().sort({'$natural':-1}).limit(6).toArray().then(function(docs){
|
||||
res.render('index', { page: "home", recent: docs, error: req.flash('search-error') });
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue