sort on created date
This commit is contained in:
parent
23896f7ee6
commit
0c1bcb728d
2 changed files with 2 additions and 2 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({$natural:-1}).limit(6).toArray().then(function(docs){
|
||||
req.db.matches.find().sort({created_at:-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