mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-26 17:12:33 +00:00
added private public view to profile -- todo : add same for article view
This commit is contained in:
@@ -13,7 +13,7 @@ var maxArticlesPerPage = 5;
|
||||
|
||||
module.exports = function(app) {
|
||||
|
||||
app.get('/articles', function(req, res, next){
|
||||
app.get('/articles', loggedIn, function(req, res, next){
|
||||
var page = req.query.page && parseInt(req.query.page, 10) || 0;
|
||||
async.parallel([
|
||||
|
||||
@@ -57,7 +57,7 @@ module.exports = function(app) {
|
||||
res.render('articles/new', {title: "New Article"});
|
||||
});
|
||||
|
||||
app.get('/articles/:title', loadArticle, function(req, res, next){
|
||||
app.get('/articles/:_id', loadArticle, function(req, res, next){
|
||||
res.render('articles/article', {title: req.article.title,
|
||||
article: req.article});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user