mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-11 22:50:28 +01:00
feat(config): Deprecate JSHint in favor of ESLint
Add basic ESLint setup extending well-known Airbnb code style. Fixes #1072, #1097
This commit is contained in:
@@ -57,13 +57,13 @@ exports.changeProfilePicture = function (req, res) {
|
||||
var user = req.user;
|
||||
var upload = multer(config.uploads.profileUpload).single('newProfilePicture');
|
||||
var profileUploadFileFilter = require(path.resolve('./config/lib/multer')).profileUploadFileFilter;
|
||||
|
||||
|
||||
// Filtering to upload only images
|
||||
upload.fileFilter = profileUploadFileFilter;
|
||||
|
||||
if (user) {
|
||||
upload(req, res, function (uploadError) {
|
||||
if(uploadError) {
|
||||
if (uploadError) {
|
||||
return res.status(400).send({
|
||||
message: 'Error occurred while uploading profile picture'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user