mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 05:37:35 +02:00
refactor: move to data
This commit is contained in:
@@ -69,10 +69,9 @@ exports.send404 = helpers.try(async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await middleware.buildHeaderAsync(req, res);
|
await middleware.buildHeaderAsync(req, res);
|
||||||
const randomIndex = Math.floor(Math.random() * error404Icons.length);
|
|
||||||
res.render('404', {
|
res.render('404', {
|
||||||
path: validator.escape(path),
|
path: validator.escape(path),
|
||||||
title: '[[global:404.title]]',
|
title: '[[global:404.title]]',
|
||||||
icon: error404Icons[randomIndex],
|
icon: error404Icons[Math.floor(Math.random() * error404Icons.length)],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user