display_moderator_tools is already returned

when new posts were loaded, we were making a socket call for each post
to check if the post is editable, but this data is already returned in
display_moderator_tools when posts are loaded.
This commit is contained in:
barisusakli
2014-03-25 13:52:25 -04:00
parent e4fbb31e68
commit 2507d6c853
2 changed files with 1 additions and 20 deletions

View File

@@ -219,16 +219,6 @@ function deleteOrRestore(command, socket, data, callback) {
});
}
SocketPosts.getPrivileges = function(socket, pid, callback) {
postTools.privileges(pid, socket.uid, function(err, privileges) {
if(err) {
return callback(err);
}
privileges.pid = parseInt(pid, 10);
callback(null, privileges);
});
};
SocketPosts.getFavouritedUsers = function(socket, pid, callback) {
favourites.getFavouritedUidsByPids([pid], function(err, data) {