Fix space-before-function-paren linter rule

This commit is contained in:
HeeL
2016-10-13 11:43:39 +02:00
parent 3fa1c1f927
commit 4a3c31b2dc
385 changed files with 6621 additions and 6622 deletions

View File

@@ -4,7 +4,7 @@ var settingsController = {};
var async = require('async'),
meta = require('../../meta');
settingsController.get = function(req, res, next) {
settingsController.get = function (req, res, next) {
var term = req.params.term ? req.params.term : 'general';
switch (req.params.term) {
@@ -24,15 +24,15 @@ function renderEmail(req, res, next) {
var utils = require('../../../public/src/utils');
var emailsPath = path.join(__dirname, '../../../public/templates/emails');
utils.walk(emailsPath, function(err, emails) {
utils.walk(emailsPath, function (err, emails) {
if (err) {
return next(err);
}
async.map(emails, function(email, next) {
async.map(emails, function (email, next) {
var path = email.replace(emailsPath, '').substr(1).replace('.tpl', '');
fs.readFile(email, function(err, original) {
fs.readFile(email, function (err, original) {
if (err) {
return next(err);
}
@@ -46,14 +46,14 @@ function renderEmail(req, res, next) {
original: original.toString()
});
});
}, function(err, emails) {
}, function (err, emails) {
if (err) {
return next(err);
}
res.render('admin/settings/email', {
emails: emails,
sendable: emails.filter(function(email) {
sendable: emails.filter(function (email) {
return email.path.indexOf('_plaintext') === -1 && email.path.indexOf('partials') === -1;
})
});