mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 16:02:38 +00:00
Add title trim before new saves and updates
This commit is contained in:
@@ -143,6 +143,7 @@ const api = {
|
||||
if(!brew.title) {
|
||||
brew.title = api.getGoodBrewTitle(brew.text);
|
||||
}
|
||||
brew.title = brew.title.trim();
|
||||
|
||||
brew.authors = (account) ? [account.username] : [];
|
||||
brew.text = api.mergeBrewText(brew);
|
||||
@@ -212,6 +213,7 @@ const api = {
|
||||
const { saveToGoogle, removeFromGoogle } = req.query;
|
||||
let afterSave = async ()=>true;
|
||||
|
||||
brew.title = brew.title.trim();
|
||||
brew.text = api.mergeBrewText(brew);
|
||||
|
||||
if(brew.googleId && removeFromGoogle) {
|
||||
|
||||
Reference in New Issue
Block a user