give user a point for submitting to news, remove broken javascript path, remove unnecessary empty js lib

This commit is contained in:
Quincy Larson
2015-05-09 15:53:01 -07:00
parent 47462991a4
commit 70503528d2
3 changed files with 6 additions and 1 deletions

View File

@ -373,6 +373,12 @@ exports.storySubmission = function(req, res, next) {
if (err) {
return res.status(500);
}
req.user.progressTimestamps.push(Date.now() || 0);
req.user.save(function (err, user) {
if (err) {
return next(err);
}
});
res.send(JSON.stringify({
storyLink: story.storyLink.replace(/\s/g, '-').toLowerCase()
}));

View File

@ -1,6 +1,5 @@
extends ../layout
block content
script(src='/js/lib/moment/moment.js')
if (user)
script.
var isLoggedIn = true;