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

@@ -73,17 +73,7 @@ SocketPosts.getRawPost = function(socket, pid, callback) {
};
SocketPosts.getPost = function(socket, pid, callback) {
async.waterfall([
function(next) {
apiController.getObjectByType(socket.uid, 'post', pid, next);
},
function(postData, next) {
if (parseInt(postData.deleted, 10) === 1) {
return next(new Error('[[error:no-post]]'));
}
next(null, postData);
}
], callback);
apiController.getPostData(pid, socket.uid, callback);
};
SocketPosts.loadMoreFavourites = function(socket, data, callback) {