chore: eslint prefer-template

This commit is contained in:
Peter Jaszkowiak
2021-02-03 23:59:08 -07:00
committed by Julian Lam
parent 4ee0f1459d
commit 707b55b6a5
357 changed files with 2425 additions and 2427 deletions

View File

@@ -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,