Centralize API.getBrew descended calls to splitTextStyleAndMetadata.

This does not address "static" pages nor change tests that called splitTextStyleAndMetadata in their own fashion.
This commit is contained in:
David Bolack
2026-09-02 12:01:50 -05:00
parent b7e67b1ab5
commit 9e1910339b
4 changed files with 1 additions and 24 deletions
-3
View File
@@ -395,7 +395,6 @@ export default async function createApp(vite) {
};
sanitizeBrew(req.brew, 'edit');
splitTextStyleAndMetadata(req.brew);
res.header('Cache-Control', 'no-cache, no-store'); //reload the latest saved brew when pressing back button, not the cached version before save.
return next();
}));
@@ -403,7 +402,6 @@ export default async function createApp(vite) {
//New Page from ID
app.get('/new/:id', asyncHandler(getBrew('share')), asyncHandler(async(req, res, next)=>{
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
const brew = {
shareId : req.brew.shareId,
title : `CLONE - ${req.brew.title}`,
@@ -461,7 +459,6 @@ export default async function createApp(vite) {
};
brew.authors.includes(req.account?.username) ? sanitizeBrew(req.brew, 'shareAuthor') : sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
return next();
}));