mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-27 16:50:59 +01:00
feat(dataLogs): show user score change history
This commit is contained in:
@@ -732,9 +732,17 @@ exports.thumbsUp = function (req, res) {
|
||||
} else {
|
||||
if (req.user.score >= thumb.score) {
|
||||
r._thumbs.push(thumb);
|
||||
scoreUpdate(req, r.user, scoreConfig.action.thumbsUpScoreOfTopicTo);
|
||||
save();
|
||||
|
||||
//score update
|
||||
//score update
|
||||
var act = scoreConfig.action.thumbsUpScoreOfTopicTo;
|
||||
act.params = {
|
||||
fid: topic.forum,
|
||||
tid: topic._id
|
||||
};
|
||||
scoreUpdate(req, r.user, act);
|
||||
|
||||
//add server message
|
||||
if (serverNoticeConfig.action.forumReplyThumbsUp.enable) {
|
||||
serverMessage.addMessage(replyUid, serverNoticeConfig.action.forumReplyThumbsUp.title, serverNoticeConfig.action.forumReplyThumbsUp.content, {
|
||||
@@ -769,9 +777,16 @@ exports.thumbsUp = function (req, res) {
|
||||
} else {
|
||||
if (req.user.score >= thumb.score) {
|
||||
topic._thumbs.push(thumb);
|
||||
scoreUpdate(req, topic.user, scoreConfig.action.thumbsUpScoreOfTopicTo);
|
||||
save();
|
||||
|
||||
//score update
|
||||
var act = scoreConfig.action.thumbsUpScoreOfTopicTo;
|
||||
act.params = {
|
||||
fid: topic.forum,
|
||||
tid: topic._id
|
||||
};
|
||||
scoreUpdate(req, topic.user, act);
|
||||
|
||||
//add server message
|
||||
if (serverNoticeConfig.action.forumTopicThumbsUp.enable) {
|
||||
serverMessage.addMessage(topic.user._id, serverNoticeConfig.action.forumTopicThumbsUp.title, serverNoticeConfig.action.forumTopicThumbsUp.content, {
|
||||
@@ -801,7 +816,13 @@ exports.thumbsUp = function (req, res) {
|
||||
}
|
||||
});
|
||||
|
||||
scoreUpdate(req, user, scoreConfig.action.thumbsUpScoreOfTopicFrom);
|
||||
//score update
|
||||
var act = scoreConfig.action.thumbsUpScoreOfTopicFrom;
|
||||
act.params = {
|
||||
fid: topic.forum,
|
||||
tid: topic._id
|
||||
};
|
||||
scoreUpdate(req, user, act);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user