fix: remove unneeded assignment, as req and locals will not likely ever be completely reassigned

This commit is contained in:
Julian Lam
2023-01-13 10:04:58 -05:00
parent 28613e70e8
commit a69bc2cf7f

View File

@@ -35,7 +35,7 @@ middleware.buildHeader = helpers.try(async (req, res, next) => {
await require('./index').applyCSRFasync(req, res); await require('./index').applyCSRFasync(req, res);
} }
({ req, locals: res.locals } = await plugins.hooks.fire('filter:middleware.buildHeader', { req: req, locals: res.locals })); await plugins.hooks.fire('filter:middleware.buildHeader', { req: req, locals: res.locals });
const [config, canLoginIfBanned] = await Promise.all([ const [config, canLoginIfBanned] = await Promise.all([
controllers.api.loadConfig(req), controllers.api.loadConfig(req),
user.bans.canLoginIfBanned(req.uid), user.bans.canLoginIfBanned(req.uid),