mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
ESlint object-curly-spacing
This commit is contained in:
@@ -46,7 +46,7 @@ Controllers.home = function (req, res, next) {
|
||||
var hook = 'action:homepage.get:' + route;
|
||||
|
||||
if (plugins.hasListeners(hook)) {
|
||||
return plugins.fireHook(hook, {req: req, res: res, next: next});
|
||||
return plugins.fireHook(hook, { req: req, res: res, next: next });
|
||||
}
|
||||
|
||||
if (route === 'categories' || route === '/') {
|
||||
@@ -83,7 +83,7 @@ Controllers.reset = function (req, res, next) {
|
||||
displayExpiryNotice: req.session.passwordExpired,
|
||||
code: req.params.code,
|
||||
minimumPasswordLength: parseInt(meta.config.minimumPasswordLength, 10),
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{text: '[[reset_password:reset_password]]', url: '/reset'}, {text: '[[reset_password:update_password]]'}]),
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[reset_password:reset_password]]', url: '/reset' }, { text: '[[reset_password:update_password]]' }]),
|
||||
title: '[[pages:reset]]',
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ Controllers.reset = function (req, res, next) {
|
||||
} else {
|
||||
res.render('reset', {
|
||||
code: null,
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{text: '[[reset_password:reset_password]]'}]),
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[reset_password:reset_password]]' }]),
|
||||
title: '[[pages:reset]]',
|
||||
});
|
||||
}
|
||||
@@ -122,7 +122,7 @@ Controllers.login = function (req, res, next) {
|
||||
data.allowLocalLogin = parseInt(meta.config.allowLocalLogin, 10) === 1 || parseInt(req.query.local, 10) === 1;
|
||||
data.allowRegistration = registrationType === 'normal' || registrationType === 'admin-approval' || registrationType === 'admin-approval-ip';
|
||||
data.allowLoginWith = '[[login:' + allowLoginWith + ']]';
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[global:login]]'}]);
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: '[[global:login]]' }]);
|
||||
data.error = req.flash('error')[0] || errorText;
|
||||
data.title = '[[pages:login]]';
|
||||
|
||||
@@ -170,7 +170,7 @@ Controllers.register = function (req, res, next) {
|
||||
}
|
||||
},
|
||||
function (next) {
|
||||
plugins.fireHook('filter:parse.post', {postData: {content: meta.config.termsOfUse || ''}}, next);
|
||||
plugins.fireHook('filter:parse.post', { postData: { content: meta.config.termsOfUse || '' } }, next);
|
||||
},
|
||||
], function (err, termsOfUse) {
|
||||
if (err) {
|
||||
@@ -188,7 +188,7 @@ Controllers.register = function (req, res, next) {
|
||||
data.maximumUsernameLength = parseInt(meta.config.maximumUsernameLength, 10);
|
||||
data.minimumPasswordLength = parseInt(meta.config.minimumPasswordLength, 10);
|
||||
data.termsOfUse = termsOfUse.postData.content;
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[register:register]]'}]);
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: '[[register:register]]' }]);
|
||||
data.regFormEntry = [];
|
||||
data.error = req.flash('error')[0] || errorText;
|
||||
data.title = '[[pages:register]]';
|
||||
@@ -329,7 +329,7 @@ Controllers.outgoing = function (req, res) {
|
||||
var data = {
|
||||
outgoing: validator.escape(String(url)),
|
||||
title: meta.config.title,
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{text: '[[notifications:outgoing_link]]'}]),
|
||||
breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[notifications:outgoing_link]]' }]),
|
||||
};
|
||||
|
||||
if (url) {
|
||||
@@ -343,7 +343,7 @@ Controllers.termsOfUse = function (req, res, next) {
|
||||
if (!meta.config.termsOfUse) {
|
||||
return next();
|
||||
}
|
||||
res.render('tos', {termsOfUse: meta.config.termsOfUse});
|
||||
res.render('tos', { termsOfUse: meta.config.termsOfUse });
|
||||
};
|
||||
|
||||
Controllers.ping = function (req, res) {
|
||||
@@ -378,11 +378,11 @@ Controllers.handle404 = function (req, res) {
|
||||
var path = String(req.path || '');
|
||||
|
||||
if (res.locals.isAPI) {
|
||||
return res.json({path: validator.escape(path.replace(/^\/api/, '')), title: '[[global:404.title]]'});
|
||||
return res.json({ path: validator.escape(path.replace(/^\/api/, '')), title: '[[global:404.title]]' });
|
||||
}
|
||||
var middleware = require('../middleware');
|
||||
middleware.buildHeader(req, res, function () {
|
||||
res.render('404', {path: validator.escape(path), title: '[[global:404.title]]'});
|
||||
res.render('404', { path: validator.escape(path), title: '[[global:404.title]]' });
|
||||
});
|
||||
} else {
|
||||
res.status(404).type('txt').send('Not found');
|
||||
@@ -436,7 +436,7 @@ Controllers.handleErrors = function (err, req, res, next) {
|
||||
|
||||
var path = String(req.path || '');
|
||||
if (res.locals.isAPI) {
|
||||
res.json({path: validator.escape(path), error: err.message});
|
||||
res.json({ path: validator.escape(path), error: err.message });
|
||||
} else {
|
||||
var middleware = require('../middleware');
|
||||
middleware.buildHeader(req, res, function () {
|
||||
|
||||
Reference in New Issue
Block a user