Merge branch 'news' of https://github.com/FreeCodeCamp/freecodecamp
This commit is contained in:
92
app.js
92
app.js
@@ -34,6 +34,11 @@ var express = require('express'),
|
||||
bonfireController = require('./controllers/bonfire'),
|
||||
coursewareController = require('./controllers/courseware'),
|
||||
|
||||
/**
|
||||
* Stories
|
||||
*/
|
||||
storyController = require('./controllers/story');
|
||||
|
||||
/**
|
||||
* User model
|
||||
*/
|
||||
@@ -221,6 +226,7 @@ app.get('/chat', resourcesController.chat);
|
||||
app.get('/live-pair-programming', resourcesController.livePairProgramming);
|
||||
app.get('/install-screenhero', resourcesController.installScreenHero);
|
||||
app.get('/javascript-in-your-inbox', resourcesController.javaScriptInYourInbox);
|
||||
app.get('/guide-to-our-nonprofit-projects', resourcesController.guideToOurNonprofitProjects);
|
||||
app.get('/chromebook', resourcesController.chromebook);
|
||||
app.get('/deploy-a-website', resourcesController.deployAWebsite);
|
||||
app.get('/gmail-shortcuts', resourcesController.gmailShortcuts);
|
||||
@@ -274,6 +280,92 @@ app.post(
|
||||
userController.updateProgress
|
||||
);
|
||||
|
||||
/**
|
||||
* Main routes.
|
||||
*/
|
||||
app.get(
|
||||
'/stories/hotStories',
|
||||
storyController.hotJSON
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/recentStories',
|
||||
storyController.recentJSON
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/',
|
||||
function(req, res) {
|
||||
res.redirect(302, '/stories/hot');
|
||||
}
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/comments/:id',
|
||||
storyController.comments
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/comment/',
|
||||
storyController.commentSubmit
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/comment/:id/comment',
|
||||
storyController.commentOnCommentSubmit
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/submit',
|
||||
storyController.submitNew
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/submit/:newStory',
|
||||
storyController.preSubmit
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/preliminary',
|
||||
storyController.newStory
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/',
|
||||
storyController.storySubmission
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/hot',
|
||||
storyController.hot
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/recent',
|
||||
storyController.recent
|
||||
);
|
||||
|
||||
|
||||
app.get(
|
||||
'/stories/search',
|
||||
storyController.search
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/search',
|
||||
storyController.getStories
|
||||
);
|
||||
|
||||
app.get(
|
||||
'/stories/:storyName',
|
||||
storyController.returnIndividualStory
|
||||
);
|
||||
|
||||
app.post(
|
||||
'/stories/upvote/',
|
||||
storyController.upvote
|
||||
);
|
||||
|
||||
/**
|
||||
* Challenge related routes
|
||||
*/
|
||||
|
Reference in New Issue
Block a user