Merge branch 'master' into videos
Conflicts: app.js
This commit is contained in:
@ -326,7 +326,6 @@ exports.completedBonfire = function (req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
if (user) {
|
||||
debug('Saving user');
|
||||
res.send(true);
|
||||
}
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ exports.returnIndividualFieldGuide = function(req, res, next) {
|
||||
return res.redirect('/field-guide');
|
||||
}
|
||||
|
||||
var fieldGuide = fieldGuideFromMongo.pop();
|
||||
var fieldGuide = R.head(fieldGuideFromMongo);
|
||||
var dashedNameFull = fieldGuide.name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, '');
|
||||
if (dashedNameFull !== dashedName) {
|
||||
return res.redirect('../field-guide/' + dashedNameFull);
|
||||
@ -54,15 +54,14 @@ exports.returnNextFieldGuide = function(req, res, next) {
|
||||
|
||||
var completed = req.user.completedFieldGuides;
|
||||
|
||||
req.user.uncompletedFieldGuides = resources.allFieldGuideIds().filter(function (elem) {
|
||||
var uncompletedFieldGuides = resources.allFieldGuideIds().filter(function (elem) {
|
||||
if (completed.indexOf(elem) === -1) {
|
||||
return elem;
|
||||
}
|
||||
});
|
||||
req.user.uncompletedFieldGuides = uncompletedFieldGuides;
|
||||
req.user.save();
|
||||
|
||||
var uncompletedFieldGuides = req.user.uncompletedFieldGuides;
|
||||
|
||||
var displayedFieldGuides = FieldGuide.find({'_id': uncompletedFieldGuides[0]});
|
||||
displayedFieldGuides.exec(function(err, fieldGuide) {
|
||||
if (err) {
|
||||
@ -81,14 +80,13 @@ exports.returnNextFieldGuide = function(req, res, next) {
|
||||
};
|
||||
|
||||
exports.completedFieldGuide = function (req, res, next) {
|
||||
debug('params in completedFieldGuide', req.params);
|
||||
var fieldGuideId = req.body.fieldGuideInfo.fieldGuideId;
|
||||
|
||||
req.user.completedFieldGuides.push(fieldGuideId);
|
||||
|
||||
var index = req.user.uncompletedFieldGuides.indexOf(fieldGuideId);
|
||||
if (index > -1) {
|
||||
req.user.progressTimestamps.push(Date.now() || 0);
|
||||
req.user.progressTimestamps.push(Date.now());
|
||||
req.user.uncompletedFieldGuides.splice(index, 1);
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,6 @@ exports.returnIndividualNonprofit = function(req, res, next) {
|
||||
var hasShownInterest = nonprofit.interestedCampers.filter(function ( obj ) {
|
||||
return obj.username === req.user.profile.username;
|
||||
});
|
||||
console.log(hasShownInterest);
|
||||
if (hasShownInterest.length === 0) {
|
||||
buttonActive = true;
|
||||
}
|
||||
|
@ -261,9 +261,7 @@ module.exports = {
|
||||
} else {
|
||||
allFieldGuideIds = fieldGuides.
|
||||
map(function (elem) {
|
||||
return {
|
||||
_id: elem._id
|
||||
};
|
||||
return elem._id;
|
||||
});
|
||||
return allFieldGuideIds;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ exports.preSubmit = function(req, res) {
|
||||
exports.returnIndividualStory = function(req, res, next) {
|
||||
var dashedName = req.params.storyName;
|
||||
|
||||
var storyName = dashedName.replace(/\-/g, ' ');
|
||||
var storyName = dashedName.replace(/\-/g, ' ').trim();
|
||||
|
||||
Story.find({'storyLink': storyName}, function(err, story) {
|
||||
if (err) {
|
||||
@ -155,7 +155,7 @@ exports.returnIndividualStory = function(req, res, next) {
|
||||
title: story.headline,
|
||||
link: story.link,
|
||||
originalStoryLink: dashedName,
|
||||
originalStoryAuthorEmail: story.author.email || "",
|
||||
originalStoryAuthorEmail: story.author.email || '',
|
||||
author: story.author,
|
||||
description: story.description,
|
||||
rank: story.upVotes.length,
|
||||
@ -321,9 +321,10 @@ exports.storySubmission = function(req, res, next) {
|
||||
.replace(/\'/g, '')
|
||||
.replace(/\"/g, '')
|
||||
.replace(/,/g, '')
|
||||
.replace(/[^a-z0-9]/gi, ' ')
|
||||
.replace(/\s+/g, ' ')
|
||||
.toLowerCase();
|
||||
.replace(/[^a-z0-9\s]/gi, '')
|
||||
.toLowerCase()
|
||||
.trim();
|
||||
var link = data.link;
|
||||
if (link.search(/^https?:\/\//g) === -1) {
|
||||
link = 'http://' + link;
|
||||
@ -334,7 +335,7 @@ exports.storySubmission = function(req, res, next) {
|
||||
}
|
||||
|
||||
// if duplicate storyLink add unique number
|
||||
storyLink = (storyCount == 0) ? storyLink : storyLink + ' ' + storyCount;
|
||||
storyLink = (storyCount === 0) ? storyLink : storyLink + ' ' + storyCount;
|
||||
|
||||
var link = data.link;
|
||||
if (link.search(/^https?:\/\//g) === -1) {
|
||||
@ -398,7 +399,7 @@ exports.storySubmission = function(req, res, next) {
|
||||
var comment = new Comment({
|
||||
associatedPost: data.associatedPost,
|
||||
originalStoryLink: data.originalStoryLink,
|
||||
originalStoryAuthorEmail: req.user.email,
|
||||
originalStoryAuthorEmail: data.originalStoryAuthorEmail,
|
||||
body: sanitizedBody,
|
||||
rank: 0,
|
||||
upvotes: 0,
|
||||
@ -496,53 +497,54 @@ exports.storySubmission = function(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
try {
|
||||
Context.find({'_id': comment.associatedPost}, function (err, associatedStory) {
|
||||
// Based on the context retrieve the parent object of the comment (Story/Comment)
|
||||
Context.find({'_id': data.associatedPost}, function (err, associatedContext) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
associatedStory = associatedStory.pop();
|
||||
if (associatedStory) {
|
||||
associatedStory.comments.push(data._id);
|
||||
associatedStory.save(function (err) {
|
||||
associatedContext = associatedContext.pop();
|
||||
if (associatedContext) {
|
||||
associatedContext.comments.push(data._id);
|
||||
associatedContext.save(function (err) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
res.send(true);
|
||||
});
|
||||
}
|
||||
User.findOne({'profile.username': associatedStory.author.username}, function(err, recipient) {
|
||||
// Find the author of the parent object
|
||||
User.findOne({'profile.username': associatedContext.author.username}, function(err, recipient) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
var recipients = '';
|
||||
if (data.originalStoryAuthorEmail && (data.originalStoryAuthorEmail !== recipient.email)) {
|
||||
recipients = data.originalStoryAuthorEmail + ',' + recipient.email;
|
||||
} else {
|
||||
recipients = recipient.email;
|
||||
// If the emails of both authors differ, only then proceed with email notification
|
||||
if (data.author.email && (data.author.email !== recipient.email)) {
|
||||
var transporter = nodemailer.createTransport({
|
||||
service: 'Mandrill',
|
||||
auth: {
|
||||
user: secrets.mandrill.user,
|
||||
pass: secrets.mandrill.password
|
||||
}
|
||||
});
|
||||
|
||||
var mailOptions = {
|
||||
to: recipient.email,
|
||||
from: 'Team@freecodecamp.com',
|
||||
subject: data.author.username + ' replied to your post on Camper News',
|
||||
text: [
|
||||
'Just a quick heads-up: ' + 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/stories/' + data.originalStoryLink,
|
||||
'- the Free Code Camp Volunteer Team'
|
||||
].join('\n')
|
||||
};
|
||||
|
||||
transporter.sendMail(mailOptions, function (err) {
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
});
|
||||
}
|
||||
var transporter = nodemailer.createTransport({
|
||||
service: 'Mandrill',
|
||||
auth: {
|
||||
user: secrets.mandrill.user,
|
||||
pass: secrets.mandrill.password
|
||||
}
|
||||
});
|
||||
var mailOptions = {
|
||||
to: recipients,
|
||||
from: 'Team@freecodecamp.com',
|
||||
subject: associatedStory.author.username + " replied to your post on Camper News",
|
||||
text: [
|
||||
"Just a quick heads-up: " + associatedStory.author.username + " replied to you on Camper News.",
|
||||
"You can keep this conversation going.",
|
||||
"Just head back to the discussion here: http://freecodecamp.com/stories/" + comment.originalStoryLink,
|
||||
'- the Free Code Camp Volunteer Team'
|
||||
].join('\n')
|
||||
};
|
||||
transporter.sendMail(mailOptions, function (err) {
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
|
@ -125,7 +125,6 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('#next-courseware-button').on('click', function() {
|
||||
console.log(passedCoursewareHash);
|
||||
if ($('.signup-btn-nav').length < 1) {
|
||||
switch (challengeType) {
|
||||
case 0:
|
||||
@ -278,7 +277,7 @@ $(document).ready(function() {
|
||||
$('#story-submit').on('click', storySubmitButtonHandler);
|
||||
|
||||
var commentSubmitButtonHandler = function commentSubmitButtonHandler() {
|
||||
$('comment-button').unbind('click');
|
||||
$('#comment-button').unbind('click');
|
||||
var data = $('#comment-box').val();
|
||||
|
||||
$('#comment-button').attr('disabled', 'disabled');
|
||||
@ -286,11 +285,14 @@ $(document).ready(function() {
|
||||
{
|
||||
data: {
|
||||
associatedPost: storyId,
|
||||
originalStoryLink: originalStoryLink,
|
||||
originalStoryAuthorEmail: originalStoryAuthorEmail,
|
||||
body: data
|
||||
}
|
||||
})
|
||||
.fail(function (xhr, textStatus, errorThrown) {
|
||||
$('#comment-button').attr('disabled', false);
|
||||
$('#comment-button').bind('click', commentSubmitButtonHandler);
|
||||
})
|
||||
.done(function (data, textStatus, xhr) {
|
||||
window.location.reload();
|
||||
|
@ -821,9 +821,9 @@
|
||||
"<span class='text-info'>Rule #3:</span> Reverse engineer the example project's functionality, and also feel free to personalize it.",
|
||||
"Here are the <a href='http://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a> you must enable, and optional bonus user stories:",
|
||||
"<span class='text-info'>User Story:</span> As a user, I can play a game of Tic Tac Toe with the computer.",
|
||||
"<span class='text-info'>Bonus User Story:</span> As a user, I can never actually win against the computer - at best I can tie.",
|
||||
"<span class='text-info'>Bonus User Story:</span> As a user, my game will reset as soon as it's over so I can play again.",
|
||||
"<span class='text-info'>Bonus User Story:</span> As a user, I can choose whether I want to play as X or O.",
|
||||
"<span class='text-info'>Hint:</span> Here's an example call to Twitch.tv's JSON API: <code>https://api.twitch.tv/kraken/streams/freecodecamp</code>.",
|
||||
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
|
||||
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
|
||||
],
|
||||
|
@ -258,6 +258,29 @@
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7159d9c442eddfaeb5bdef",
|
||||
"name": "What does Register mean?",
|
||||
"description": [
|
||||
"<div class=\"col-xs-12 col-sm-10 col-sm-offset-1\">",
|
||||
"<h2 class='text-center'></h2>",
|
||||
"<div class=\"embed-responsive embed-responsive-16by9\"><iframe src=\"//player.vimeo.com/video/107073108\" class=\"embed-responsive-item\"></iframe></div>",
|
||||
"<div class=\"text-left\">",
|
||||
" <h3>These global shortcuts work everywhere on a Mac:",
|
||||
" <ul>",
|
||||
" <li>Control + F = Forward</li>",
|
||||
" <li>Control + B = Backward</li>",
|
||||
" <li>Control + N = Next Line</li>",
|
||||
" <li>Control + P = Previous Line</li>",
|
||||
" <li>Control + H = Backspace</li>",
|
||||
" <li>Control + D = Delete</li>",
|
||||
" <li>Control + A = Beginning of Line</li>",
|
||||
" <li>Control + E = End of Line</li>",
|
||||
" <li>Control + K = Kill line</li>",
|
||||
" </ul>",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7158d9c445eddfaeb5bdef",
|
||||
"name": "Gmail Zero Inbox Shortcuts",
|
||||
@ -370,103 +393,6 @@
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7158d9c448eddfaeb5bdef",
|
||||
"name": "Live Stream Pair Programming on Twitch.tv",
|
||||
"description": [
|
||||
"<div class=\"text-center\">",
|
||||
" <h1>Live Pair Programming</h1>",
|
||||
" <h2 id=\"next-session\"></h2>",
|
||||
" <h2>Watch the live stream below or on our  <a href=\"http://twitch.tv/freecodecamp\" target=\"_blank\">Twitch.tv channel</a>.</h2>",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-md-8 col-xs-12\">",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9\">",
|
||||
" <iframe src=\"http://www.twitch.tv/freecodecamp/embed\" frameborder=\"0\" scrolling=\"no\"></iframe>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <div class=\"col-md-4 col-xs-12\">",
|
||||
" <div class=\"visible-sm visible-xs\">",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9\">",
|
||||
" <iframe src=\"http://www.twitch.tv/freecodecamp/chat?popout=\" frameborder=\"0\" scrolling=\"no\"></iframe>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <div class=\"visible-md visible-lg\">",
|
||||
" <div class=\"embed-responsive embed-responsive-twitch-chat\">",
|
||||
" <iframe src=\"http://www.twitch.tv/freecodecamp/chat?popout=\" frameborder=\"0\" scrolling=\"no\"></iframe>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" </div>",
|
||||
" <h1>Previous Live Pair Programming Sessions</h1>",
|
||||
" <div class=\"col-xs-12\">",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9 big-break\">",
|
||||
" <iframe src=\"//www.youtube.com/embed/_BErpDdmBOw\" class=\"embed-responsive-item\"></iframe>",
|
||||
" </div>",
|
||||
" <h3 class=\"wrappable\">link:  <a href=\"http://www.youtube.com/watch/_BErpDdmBOw\">http://www.youtube.com/watch/_BErpDdmBOw</a></h3>",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9 big-break\">",
|
||||
" <iframe src=\"//www.youtube.com/embed/Fn9HMn79KH0\" class=\"embed-responsive-item\"></iframe>",
|
||||
" </div>",
|
||||
" <h3 class=\"wrappable\">link:  <a href=\"http://www.youtube.com/watch/Fn9HMn79KH0\">http://www.youtube.com/watch/Fn9HMn79KH0</a></h3>",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9 big-break\">",
|
||||
" <iframe src=\"//www.youtube.com/embed/S7iRBZJwOAs\" class=\"embed-responsive-item\"></iframe>",
|
||||
" </div>",
|
||||
" <h3 class=\"wrappable\">link:  <a href=\"http://www.youtube.com/watch/S7iRBZJwOAs\">http://www.youtube.com/watch/S7iRBZJwOAs</a></h3>",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9 big-break\">",
|
||||
" <iframe src=\"//www.youtube.com/embed/BHNRg39ZblE\" class=\"embed-responsive-item\"></iframe>",
|
||||
" </div>",
|
||||
" <h3 class=\"wrappable\">link:  <a href=\"http://www.youtube.com/watch/BHNRg39ZblE\">http://www.youtube.com/watch/BHNRg39ZblE</a></h3>",
|
||||
" <div class=\"embed-responsive embed-responsive-16by9 big-break\">",
|
||||
" <iframe src=\"//www.youtube.com/embed/YDfkHlDmehA\" class=\"embed-responsive-item\"></iframe>",
|
||||
" </div>",
|
||||
" <h3 class=\"wrappable\">link:  <a href=\"http://www.youtube.com/watch/YDfkHlDmehA\">http://www.youtube.com/watch/YDfkHlDmehA</a></h3>",
|
||||
" </div>",
|
||||
" <script src=\"/js/lib/moment/moment.js\"></script>",
|
||||
" <script src=\"/js/lib/moment/nextTuesday.js\"></script>",
|
||||
" <script>$('#next-session').text(nextSession());</script>",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7158d9c449eddfaeb5bdef",
|
||||
"name": "Nodeschool Challenges",
|
||||
"description": [
|
||||
"<h2 class='text-center'>Learn Node.js, NPM, Express.js, and advanced JavaScript like Functional Programming and Promises</h2><br/>",
|
||||
"<div class=\"embed-responsive embed-responsive-16by9\">",
|
||||
" <iframe src=\"//player.vimeo.com/video/122719685\" class=\"embed-responsive-item\"></iframe>",
|
||||
"</div>",
|
||||
"<div class=\"text-left col-xs-12 col-sm-10 col-sm-offset-1\">",
|
||||
" <h3>Here are the NodeSchool courses you should complete:",
|
||||
" <ol>",
|
||||
" <li><a href=\"http://runnable.com/VQuO_Y4BbkhaOOsV/nodeschool-io-s-learnyounode-course-available-in-your-browser-for-node-js-and-freecodecamp\" target=\"_blank\">NodeSchool.io's LearnYouNode course</a></li>",
|
||||
" <li><a href=\"http://runnable.com/VQt7deuMe6RZ3Gcl/nodeschool-io-s-learn-to-npm-course-running-in-your-browser-for-node-js-and-hello-world\" target=\"_blank\">NodeSchool.io's Learn-to-NPM course</a></li>",
|
||||
" <li><a href=\"http://runnable.com/VQufnaRAlaNc9JuM/nodeschool-io-s-express-js-course-available-in-your-browser-for-node-js-and-freecodecamp\" target=\"_blank\">NodeSchool.io's Express.js course</a></li>",
|
||||
" <li><a href=\"http://runnable.com/VQuZjvia8Gxcqkpy/nodeschool-io-s-functional-programming-in-javascript-course-available-in-your-browser-for-node-js-and-freecodecamp\" target=\"_blank\">NodeSchool.io's Functional Programming in JavaScript course</a></li>",
|
||||
" <li><a href=\"http://runnable.com/VQunH26qdytcbLBg/nodeschool-io-s-promise-it-won-t-hurt-promises-course-available-in-your-browser-for-node-js-javascript-and-freecodecamp\" target=\"_blank\">NodeSchool.io's Promise It Won't Hurt Promises course</a></li>",
|
||||
" </ol>",
|
||||
" </h3>",
|
||||
"</div><br/>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7158d9c450eddfaeb5bdef",
|
||||
"name": "Nonprofit Project Instructions",
|
||||
"description": [
|
||||
"<div class='col-xs-12 col-sm-10 col-sm-offset-1'>",
|
||||
"<h3>It's time to apply what you've learned here at Free Code Camp.</h3>",
|
||||
"<h3>By the end of this process, you'll have a portfolio of live apps being used by real people.</h3>",
|
||||
"<h3>Please do the following immediately:</h3>",
|
||||
"<h4>",
|
||||
" <ol>",
|
||||
" <li>Complete this form:  <a href=\"http://goo.gl/forms/f61dLt67t8\" target=\"_blank\">http://goo.gl/forms/f61dLt67t8</a>.</li>",
|
||||
" <li>Read this document, which will answer many questions you may have about our nonprofit projects:  <a href=\"/field-guide/guide-to-our-nonprofit-projects\" target=\"_blank\">http://freecodecamp.com/field-guide/guide-to-our-nonprofit-projects</a>.</li>",
|
||||
" <li>We'll send you an invite to our Nonprofit Projects Trello board. Once we do, go there and add yourself to at least 3 nonprofit projects that interest you.</li>",
|
||||
" <li>Finish any unfinished Bonfire challenges. These challenges serve as the Free Code Camp \"exit test\". You must complete these before you can start working on nonprofit projects. If you completed CoderByte or CodeWars challenges instead of Bonfire, email us and we'll take a look: <a href=\"mailto:team@freecodecamp.com\">team@freecodecamp.com</a>.</li>",
|
||||
" </ol>",
|
||||
" <h4>Please email us if you have further questions:  <a href=\"mailto:team@freecodecamp.com\">team@freecodecamp.com</a>.</h4>",
|
||||
"</h4>",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "bd7158d9c451eddfaeb5bded",
|
||||
"name": "Bonfire Style Guide",
|
||||
|
50
seed_data/storyCleanup.js
Normal file
50
seed_data/storyCleanup.js
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Created by nathanleniz on 4/25/15.
|
||||
*/
|
||||
require('dotenv').load();
|
||||
var mongodb = require('mongodb'),
|
||||
Story = require('../models/Story.js'),
|
||||
secrets = require('../config/secrets');
|
||||
mongoose = require('mongoose');
|
||||
|
||||
mongoose.connect(secrets.db);
|
||||
|
||||
function storyLinkCleanup(cb) {
|
||||
console.log('headLineCleanup');
|
||||
var i = 1;
|
||||
var stream = Story.find({}).skip(0).limit(0).batchSize(20000).stream();
|
||||
|
||||
stream.on('data', function (story) {
|
||||
console.log(i++);
|
||||
this.pause();
|
||||
story.storyLink = story.storyLink.
|
||||
replace(/\'/g, '').
|
||||
replace(/\"/g, '').
|
||||
replace(/,/g, '').
|
||||
replace(/\s+/g, ' ').
|
||||
replace(/[^a-z0-9\s]/gi, '').
|
||||
toLowerCase().
|
||||
trim();
|
||||
story.save(function (err) {
|
||||
if (err) {
|
||||
console.log('woops');
|
||||
}
|
||||
this.resume();
|
||||
}.bind(this));
|
||||
})
|
||||
.on('error', function (err) {
|
||||
console.error(err);
|
||||
}).on('close', function () {
|
||||
console.log('done with set');
|
||||
stream.destroy();
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
||||
function done() {
|
||||
console.log('Migration script has completed');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
storyLinkCleanup(done);
|
@ -108,6 +108,7 @@
|
||||
data: {
|
||||
associatedPost: commentId,
|
||||
originalStoryLink: originalStoryLink,
|
||||
originalStoryAuthorEmail: originalStoryAuthorEmail,
|
||||
body: $('#comment-to-comment-textinput').val(),
|
||||
}
|
||||
})
|
||||
|
@ -2,6 +2,7 @@
|
||||
script.
|
||||
var storyId = !{JSON.stringify(id)};
|
||||
var originalStoryLink = !{JSON.stringify(originalStoryLink)};
|
||||
var originalStoryAuthorEmail = !{JSON.stringify(originalStoryAuthorEmail)};
|
||||
var comments = !{JSON.stringify(comments)};
|
||||
var upVotes = !{JSON.stringify(upVotes)};
|
||||
var image = !{JSON.stringify(image)};
|
||||
|
Reference in New Issue
Block a user