fix remove mongoose specific function
This commit is contained in:
@ -234,14 +234,11 @@ module.exports = function(app) {
|
|||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
story = story.pop();
|
story = story.pop();
|
||||||
story.rank++;
|
story.rank += 1;
|
||||||
story.upVotes.push(
|
story.upVotes.push({
|
||||||
{
|
|
||||||
upVotedBy: req.user.id,
|
upVotedBy: req.user.id,
|
||||||
upVotedByUsername: req.user.username
|
upVotedByUsername: req.user.username
|
||||||
}
|
});
|
||||||
);
|
|
||||||
story.markModified('rank');
|
|
||||||
story.save();
|
story.save();
|
||||||
// NOTE(Berks): This logic is full of wholes and race conditions
|
// NOTE(Berks): This logic is full of wholes and race conditions
|
||||||
// this could be the source of many 'can't set headers after
|
// this could be the source of many 'can't set headers after
|
||||||
|
Reference in New Issue
Block a user