fix(eslint): Inconsistent spacing before function parentheses (#1844)

Defines `space-before-function-paren` eslint rule and changes files accordingly.
This commit is contained in:
Mikael Korpela
2017-08-14 23:50:33 +03:00
committed by GitHub
parent 4fcf240550
commit f44c9bce71
21 changed files with 214 additions and 210 deletions

View File

@@ -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) {