add missing board data to options in buildcustompage to prevent double fetch from db

and fix not rebuilding them on "rebuildOther" for example for customcsss change
jschan
Thomas Lynch 3 years ago
parent 097d2dd57c
commit 444f71c637
  1. 1
      models/forms/changeboardsettings.js
  2. 2
      models/pages/custompage.js

@ -226,6 +226,7 @@ module.exports = async (req, res, next) => {
} }
if (rebuildOther) { if (rebuildOther) {
promises.push(remove(`${uploadDirectory}/html/${req.params.board}/logs/`)); promises.push(remove(`${uploadDirectory}/html/${req.params.board}/logs/`));
promises.push(remove(`${uploadDirectory}/html/${req.params.board}/custompage/`));
buildQueue.push({ buildQueue.push({
'task': 'buildModLogList', 'task': 'buildModLogList',
'options': { 'options': {

@ -6,7 +6,7 @@ module.exports = async (req, res, next) => {
let html; let html;
try { try {
html = await buildCustomPage(req.params); html = await buildCustomPage({ ...req.params, board: res.locals.board });
} catch (err) { } catch (err) {
return next(err); return next(err);
} }

Loading…
Cancel
Save