initial commit

This commit is contained in:
equippedcoding-master
2025-09-17 09:37:06 -05:00
parent 86108ca47e
commit e2c98790b2
55389 changed files with 6206730 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { findPageById } from '../page/page.services';
const renderHtml = async (req, res, next) => {
try {
const { params } = req;
const { pageId } = params;
const page = await findPageById(pageId);
if (!page) {
res.render('404');
}
const { content, name } = page;
let html = content['mycustom-html'];
const css = content['mycustom-css'];
res.render('render', { html, css, name });
} catch (error) {
res.render('404');
}
};
export default renderHtml;