feat(forums): top status of topic set and showed

This commit is contained in:
OldHawk
2017-07-15 13:38:26 +08:00
parent cad028954d
commit 9e6dc7adbc
10 changed files with 68 additions and 5 deletions

View File

@@ -264,6 +264,24 @@
});
};
/**
* beginTopTopic
* @param t
*/
vm.beginTopTopic = function (t) {
var topic = new TopicsService({
forum: vm.forum._id,
_id: t._id
});
topic.$toggleTopicTopStatus(function (res) {
vm.topic = res;
NotifycationService.showSuccessNotify('FORUMS.TOPIC_TOGGLE_TOP_SUCCESSFULLY');
}, function (res) {
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.TOPIC_TOGGLE_TOP_FAILED');
});
};
/**
* beginDeleteReply
* @param reply