give user a point for submitting to news, remove broken javascript path, remove unnecessary empty js lib
This commit is contained in:
@ -373,6 +373,12 @@ exports.storySubmission = function(req, res, next) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
return res.status(500);
|
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({
|
res.send(JSON.stringify({
|
||||||
storyLink: story.storyLink.replace(/\s/g, '-').toLowerCase()
|
storyLink: story.storyLink.replace(/\s/g, '-').toLowerCase()
|
||||||
}));
|
}));
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
block content
|
block content
|
||||||
script(src='/js/lib/moment/moment.js')
|
|
||||||
if (user)
|
if (user)
|
||||||
script.
|
script.
|
||||||
var isLoggedIn = true;
|
var isLoggedIn = true;
|
||||||
|
Reference in New Issue
Block a user