mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 09:42:43 +00:00
Add trim to brew description
This commit is contained in:
@@ -143,12 +143,14 @@ const api = {
|
|||||||
if(!brew.title) {
|
if(!brew.title) {
|
||||||
brew.title = api.getGoodBrewTitle(brew.text);
|
brew.title = api.getGoodBrewTitle(brew.text);
|
||||||
}
|
}
|
||||||
brew.title = brew.title.trim();
|
|
||||||
|
|
||||||
brew.authors = (account) ? [account.username] : [];
|
brew.authors = (account) ? [account.username] : [];
|
||||||
brew.text = api.mergeBrewText(brew);
|
brew.text = api.mergeBrewText(brew);
|
||||||
|
|
||||||
_.defaults(brew, DEFAULT_BREW);
|
_.defaults(brew, DEFAULT_BREW);
|
||||||
|
|
||||||
|
brew.title = brew.title.trim();
|
||||||
|
brew.description = brew.description.trim();
|
||||||
},
|
},
|
||||||
newGoogleBrew : async (account, brew, res)=>{
|
newGoogleBrew : async (account, brew, res)=>{
|
||||||
const oAuth2Client = GoogleActions.authCheck(account, res);
|
const oAuth2Client = GoogleActions.authCheck(account, res);
|
||||||
@@ -214,6 +216,7 @@ const api = {
|
|||||||
let afterSave = async ()=>true;
|
let afterSave = async ()=>true;
|
||||||
|
|
||||||
brew.title = brew.title.trim();
|
brew.title = brew.title.trim();
|
||||||
|
brew.description = brew.description.trim() || '';
|
||||||
brew.text = api.mergeBrewText(brew);
|
brew.text = api.mergeBrewText(brew);
|
||||||
|
|
||||||
if(brew.googleId && removeFromGoogle) {
|
if(brew.googleId && removeFromGoogle) {
|
||||||
|
|||||||
Reference in New Issue
Block a user