Move userpage brew data clean up to app.js
This commit is contained in:
1 parent
a30c2fa1f7
commit
3e43b058a5
2 files changed
+3
-1
No files matched your search
@@ -268,6 +268,9 @@ app.get('/user/:username', async (req, res, next)=>{
|
||||
}
|
||||
|
||||
req.brews = _.map(brews, (brew)=>{
|
||||
// Clean up brew data
|
||||
brew.title = brew.title?.trim();
|
||||
brew.description = brew.description?.trim();
|
||||
return sanitizeBrew(brew, ownAccount ? 'edit' : 'share');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user