fix(torrents): fixed thumbs up of torrent issue

This commit is contained in:
OldHawk
2018-02-01 12:53:05 +08:00
parent f9755c68c6
commit 3331a89dd0
2 changed files with 7 additions and 7 deletions

View File

@@ -37,12 +37,12 @@ module.exports.update = function (req, user, action, value) {
user.markModified('examinationData');
}
user.score += v;
user.save();
traceLogCreate(req, traceConfig.action.userScoreChange, {
user: user._id,
score: v,
scoreActionName: action.name
user.save(function () {
traceLogCreate(req, traceConfig.action.userScoreChange, {
user: user._id,
score: v,
scoreActionName: action.name
});
});
}
}

View File

@@ -1072,7 +1072,7 @@
vm.beginThumbsUp = function (t) {
t.$thumbsUp(function (res) {
vm.torrentLocalInfo = res;
vm.torrentTabs[3].badges[0].value += 1;
Notification.success({
message: '<i class="glyphicon glyphicon-ok"></i> ' + $translate.instant('TORRENT_THUMBS_SUCCESSFULLY')
});