mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-06 12:11:02 +01:00
feat(forums): moderators/oper/admin can toggle set topic readonly status
This commit is contained in:
@@ -301,6 +301,27 @@
|
||||
}, 500);
|
||||
};
|
||||
|
||||
/**
|
||||
* toggleReadonly
|
||||
* @param t
|
||||
*/
|
||||
vm.toggleReadonly = function (t) {
|
||||
var topic = new TopicsService({
|
||||
forum: vm.forum._id,
|
||||
_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');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* postReply
|
||||
* @param isValid
|
||||
|
||||
Reference in New Issue
Block a user