mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
ESlint comma-dangle
This commit is contained in:
@@ -24,7 +24,7 @@ module.exports = function (SocketUser) {
|
||||
type: 'user-ban',
|
||||
uid: socket.uid,
|
||||
targetUid: uid,
|
||||
ip: socket.ip
|
||||
ip: socket.ip,
|
||||
}, next);
|
||||
},
|
||||
function (next) {
|
||||
@@ -32,10 +32,10 @@ module.exports = function (SocketUser) {
|
||||
callerUid: socket.uid,
|
||||
ip: socket.ip,
|
||||
uid: uid,
|
||||
until: data.until > 0 ? data.until : undefined
|
||||
until: data.until > 0 ? data.until : undefined,
|
||||
});
|
||||
next();
|
||||
}
|
||||
},
|
||||
], next);
|
||||
}, callback);
|
||||
};
|
||||
@@ -51,17 +51,17 @@ module.exports = function (SocketUser) {
|
||||
type: 'user-unban',
|
||||
uid: socket.uid,
|
||||
targetUid: uid,
|
||||
ip: socket.ip
|
||||
ip: socket.ip,
|
||||
}, next);
|
||||
},
|
||||
function (next) {
|
||||
plugins.fireHook('action:user.unbanned', {
|
||||
callerUid: socket.uid,
|
||||
ip: socket.ip,
|
||||
uid: uid
|
||||
uid: uid,
|
||||
});
|
||||
next();
|
||||
}
|
||||
},
|
||||
], next);
|
||||
}, callback);
|
||||
};
|
||||
@@ -80,7 +80,7 @@ module.exports = function (SocketUser) {
|
||||
return next(new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
async.each(uids, method, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ module.exports = function (SocketUser) {
|
||||
function (next) {
|
||||
websockets.in('uid_' + uid).emit('event:banned');
|
||||
next();
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = function (SocketUser) {
|
||||
plugins.fireHook('filter:user.getPicture', {
|
||||
uid: socket.uid,
|
||||
type: type,
|
||||
picture: undefined
|
||||
picture: undefined,
|
||||
}, function (err, returnData) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
@@ -50,7 +50,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (picture, next) {
|
||||
user.setUserField(data.uid, 'picture', picture, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (uploadedImage, next) {
|
||||
next(null, uploadedImage ? uploadedImage.url : null);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -97,9 +97,9 @@ module.exports = function (SocketUser) {
|
||||
|
||||
user.setUserFields(data.uid, {
|
||||
uploadedpicture: '',
|
||||
picture: userData.uploadedpicture === userData.picture ? '' : userData.picture // if current picture is uploaded picture, reset to user icon
|
||||
picture: userData.uploadedpicture === userData.picture ? '' : userData.picture, // if current picture is uploaded picture, reset to user icon
|
||||
}, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -111,9 +111,9 @@ module.exports = function (SocketUser) {
|
||||
async.parallel({
|
||||
list: async.apply(plugins.fireHook, 'filter:user.listPictures', {
|
||||
uid: data.uid,
|
||||
pictures: []
|
||||
pictures: [],
|
||||
}),
|
||||
uploaded: async.apply(user.getUserField, data.uid, 'uploadedpicture')
|
||||
uploaded: async.apply(user.getUserField, data.uid, 'uploadedpicture'),
|
||||
}, function (err, data) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@@ -123,7 +123,7 @@ module.exports = function (SocketUser) {
|
||||
data.list.pictures.push({
|
||||
type: 'uploaded',
|
||||
url: data.uploaded,
|
||||
text: '[[user:uploaded_picture]]'
|
||||
text: '[[user:uploaded_picture]]',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (next) {
|
||||
SocketUser.updateProfile(socket, data, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (next) {
|
||||
user.updateCoverPicture(data, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (next) {
|
||||
user.uploadCroppedPicture(data, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (next) {
|
||||
user.removeCoverPicture(data, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ module.exports = function (SocketUser) {
|
||||
} else {
|
||||
next(null, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@@ -114,7 +114,7 @@ module.exports = function (SocketUser) {
|
||||
type: 'password-change',
|
||||
uid: socket.uid,
|
||||
targetUid: data.uid,
|
||||
ip: socket.ip
|
||||
ip: socket.ip,
|
||||
});
|
||||
callback();
|
||||
});
|
||||
@@ -146,7 +146,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
canEdit: function (next) {
|
||||
privileges.users.canEdit(socket.uid, data.uid, next);
|
||||
}
|
||||
},
|
||||
}, next);
|
||||
},
|
||||
function (results, next) {
|
||||
@@ -183,7 +183,7 @@ module.exports = function (SocketUser) {
|
||||
}
|
||||
|
||||
next(null, userData);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = function (SocketUser) {
|
||||
onlineOnly: data.onlineOnly,
|
||||
bannedOnly: data.bannedOnly,
|
||||
flaggedOnly: data.flaggedOnly,
|
||||
uid: socket.uid
|
||||
uid: socket.uid,
|
||||
}, function (err, result) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (userData, next) {
|
||||
next(null, user.getStatus(userData));
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
@@ -43,11 +43,11 @@ module.exports = function (SocketUser) {
|
||||
function (next) {
|
||||
var data = {
|
||||
uid: socket.uid,
|
||||
status: status
|
||||
status: status,
|
||||
};
|
||||
websockets.server.emit('event:user_status_change', data);
|
||||
next(null, data);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user