FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updates to modern Mongoose query syntax for people#find · BeerAndCodeSeattle/BeerAndCode@a2b238a · GitHub

Commit a2b238a

Browse files
committed
Updates to modern Mongoose query syntax for people#find
1 parent f02874c commit a2b238a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎app.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ app.get('/not_authorized', function (req, res) {
8585
});
8686

8787
handleError = function (err, res) {
88-
res.writeHead(500, {'Content-Type': 'text/html'});
89-
res.render('error', { locals: { err: err } });
88+
res.render('error', { err: err });
9089
};
9190

9291
// People Related Routes
@@ -244,7 +243,7 @@ app.get('/people/getGithubProjects/:ghid', bacAuth.doAuth, function (req, res) {
244243
});
245244

246245
app.get('/people', function (req, res) {
247-
Person.find({}, [], {sort: {'name': 1}}, function (err, people) {
246+
Person.find({}, {}, {sort: 'name'}, function (err, people) {
248247
if (err) {
249248
handleError(err, res);
250249
} else {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL