mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 00:29:03 +02:00
feat(forums): user can thumbs up to topic and reply with score donate
This commit is contained in:
@@ -311,15 +311,12 @@
|
||||
_id: t._id
|
||||
});
|
||||
|
||||
console.log(topic);
|
||||
|
||||
topic.$toggleTopicReadonly(function (res) {
|
||||
vm.topic = res;
|
||||
NotifycationService.showSuccessNotify('FORUMS.TOPIC_TOGGLE_READONLY_SUCCESSFULLY');
|
||||
}, function (res) {
|
||||
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.TOPIC_TOGGLE_READONLY_FAILED');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -374,5 +371,24 @@
|
||||
vm.postReplyFields.content = list.join('\n');
|
||||
vm.beginPostReply();
|
||||
};
|
||||
|
||||
/**
|
||||
* beginThumbsUp
|
||||
* @param t,topic
|
||||
* @param r,reply
|
||||
*/
|
||||
vm.beginThumbsUp = function (t, r) {
|
||||
var topic = new TopicsService({
|
||||
forum: vm.forum._id,
|
||||
_id: t._id,
|
||||
_replyId: r ? r._id : undefined
|
||||
});
|
||||
|
||||
topic.$thumbsUp(function (res) {
|
||||
console.log(res);
|
||||
vm.topic = res;
|
||||
NotifycationService.showSuccessNotify('FORUMS.TOPIC_TOGGLE_READONLY_SUCCESSFULLY');
|
||||
});
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user