mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -38,7 +38,7 @@ async function rewrite(req, res, next) {
|
||||
}
|
||||
|
||||
const pathname = parsedUrl.pathname;
|
||||
const hook = 'action:homepage.get:' + pathname;
|
||||
const hook = `action:homepage.get:${pathname}`;
|
||||
if (!plugins.hooks.hasListeners(hook)) {
|
||||
req.url = req.path + (!req.path.endsWith('/') ? '/' : '') + pathname;
|
||||
} else {
|
||||
@@ -52,7 +52,7 @@ async function rewrite(req, res, next) {
|
||||
exports.rewrite = rewrite;
|
||||
|
||||
function pluginHook(req, res, next) {
|
||||
var hook = 'action:homepage.get:' + res.locals.homePageRoute;
|
||||
var hook = `action:homepage.get:${res.locals.homePageRoute}`;
|
||||
|
||||
plugins.hooks.fire(hook, {
|
||||
req: req,
|
||||
|
||||
Reference in New Issue
Block a user