mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
Fix space-before-function-paren linter rule
This commit is contained in:
@@ -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;
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user