Update story api to use stories instead of news
This commit is contained in:
@ -324,7 +324,7 @@ $(document).ready(function() {
|
||||
$('#story-submit').bind('click', storySubmitButtonHandler);
|
||||
})
|
||||
.done(function (data, textStatus, xhr) {
|
||||
window.location = '/news/' + JSON.parse(data).storyLink;
|
||||
window.location = '/stories/' + JSON.parse(data).storyLink;
|
||||
});
|
||||
|
||||
};
|
||||
|
@ -22,9 +22,9 @@ module.exports = function(app) {
|
||||
router.get('/stories/submit/new-story', preSubmit);
|
||||
router.post('/stories/preliminary', newStory);
|
||||
router.post('/stories/', storySubmission);
|
||||
router.get('/news/', hot);
|
||||
router.get('/stories/', hot);
|
||||
router.post('/stories/search', getStories);
|
||||
router.get('/news/:storyName', returnIndividualStory);
|
||||
router.get('/stories/:storyName', returnIndividualStory);
|
||||
router.post('/stories/upvote/', upvote);
|
||||
|
||||
app.use(router);
|
||||
@ -152,7 +152,7 @@ module.exports = function(app) {
|
||||
'Please double check the name.'
|
||||
});
|
||||
|
||||
return res.redirect('/news/');
|
||||
return res.redirect('/stories/');
|
||||
}
|
||||
|
||||
story = story.pop();
|
||||
@ -160,7 +160,7 @@ module.exports = function(app) {
|
||||
.replace(/\s+/g, ' ')
|
||||
.replace(/\s/g, '-');
|
||||
if (dashedNameFull !== dashedName) {
|
||||
return res.redirect('../news/' + dashedNameFull);
|
||||
return res.redirect('../stories/' + dashedNameFull);
|
||||
}
|
||||
|
||||
var userVoted = false;
|
||||
@ -324,7 +324,7 @@ module.exports = function(app) {
|
||||
});
|
||||
return res.json({
|
||||
alreadyPosted: true,
|
||||
storyURL: '/news/' + story.pop().storyLink
|
||||
storyURL: '/stories/' + story.pop().storyLink
|
||||
});
|
||||
}
|
||||
utils.getURLTitle(url, processResponse);
|
||||
@ -600,7 +600,7 @@ module.exports = function(app) {
|
||||
data.author.username + ' replied to you on Camper News.',
|
||||
'You can keep this conversation going.',
|
||||
'Just head back to the discussion here: ',
|
||||
'http://freecodecamp.com/news/' + data.originalStoryLink,
|
||||
'http://freecodecamp.com/stories/' + data.originalStoryLink,
|
||||
'- the Free Code Camp Volunteer Team'
|
||||
].join('\n')
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
|
||||
li
|
||||
a(href='/challenges/waypoint-join-our-chat-room') Chat
|
||||
li
|
||||
a(href='/news') News
|
||||
a(href='/stories') News
|
||||
li
|
||||
a(href='/field-guide') Guide
|
||||
li.hidden-xs.hidden-sm
|
||||
|
Reference in New Issue
Block a user