mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-18 01:50:37 +01:00
fix(eslint): Inconsistent spacing before function parentheses (#1844)
Defines `space-before-function-paren` eslint rule and changes files accordingly.
This commit is contained in:
@@ -81,7 +81,7 @@ exports.changeProfilePicture = function (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
function uploadImage () {
|
||||
function uploadImage() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
upload(req, res, function (uploadError) {
|
||||
if (uploadError) {
|
||||
@@ -93,7 +93,7 @@ exports.changeProfilePicture = function (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
function updateUser () {
|
||||
function updateUser() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
user.profileImageURL = config.uploads.profile.image.dest + req.file.filename;
|
||||
user.save(function (err, theuser) {
|
||||
@@ -106,7 +106,7 @@ exports.changeProfilePicture = function (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
function deleteOldImage () {
|
||||
function deleteOldImage() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (existingImageUrl !== User.schema.path('profileImageURL').defaultValue) {
|
||||
fs.unlink(existingImageUrl, function (unlinkError) {
|
||||
@@ -133,7 +133,7 @@ exports.changeProfilePicture = function (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
function login () {
|
||||
function login() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
req.login(user, function (err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user