This commit is contained in:
barisusakli
2016-07-01 13:01:09 +03:00
parent 376e031928
commit 795b00a3af
5 changed files with 100 additions and 66 deletions

View File

@@ -111,17 +111,7 @@ SocketTopics.isModerator = function(socket, tid, callback) {
};
SocketTopics.getTopic = function (socket, tid, callback) {
async.waterfall([
function (next) {
apiController.getObjectByType(socket.uid, 'topic', tid, next);
},
function (topicData, next) {
if (parseInt(topicData.deleted, 10) === 1) {
return next(new Error('[[error:no-topic]]'));
}
next(null, topicData);
}
], callback);
apiController.getTopicData(tid, socket.uid, callback);
};
module.exports = SocketTopics;