mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
Fix space-before-function-paren linter rule
This commit is contained in:
@@ -8,7 +8,7 @@ var social = {};
|
||||
|
||||
social.postSharing = null;
|
||||
|
||||
social.getPostSharing = function(callback) {
|
||||
social.getPostSharing = function (callback) {
|
||||
if (social.postSharing) {
|
||||
return callback(null, social.postSharing);
|
||||
}
|
||||
@@ -32,16 +32,16 @@ social.getPostSharing = function(callback) {
|
||||
];
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
function (next) {
|
||||
plugins.fireHook('filter:social.posts', networks, next);
|
||||
},
|
||||
function(networks, next) {
|
||||
db.getSetMembers('social:posts.activated', function(err, activated) {
|
||||
function (networks, next) {
|
||||
db.getSetMembers('social:posts.activated', function (err, activated) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
networks.forEach(function(network, i) {
|
||||
networks.forEach(function (network, i) {
|
||||
networks[i].activated = (activated.indexOf(network.id) !== -1);
|
||||
});
|
||||
|
||||
@@ -52,19 +52,19 @@ social.getPostSharing = function(callback) {
|
||||
], callback);
|
||||
};
|
||||
|
||||
social.getActivePostSharing = function(callback) {
|
||||
social.getPostSharing(function(err, networks) {
|
||||
social.getActivePostSharing = function (callback) {
|
||||
social.getPostSharing(function (err, networks) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
networks = networks.filter(function(network) {
|
||||
networks = networks.filter(function (network) {
|
||||
return network && network.activated;
|
||||
});
|
||||
callback(null, networks);
|
||||
});
|
||||
};
|
||||
|
||||
social.setActivePostSharingNetworks = function(networkIDs, callback) {
|
||||
social.setActivePostSharingNetworks = function (networkIDs, callback) {
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
db.delete('social:posts.activated', next);
|
||||
|
||||
Reference in New Issue
Block a user