mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 23:12:39 +00:00
lint
This commit is contained in:
@@ -50,8 +50,8 @@ router.put('/api/update/:id', (req, res)=>{
|
|||||||
brew = _.merge(brew, req.body);
|
brew = _.merge(brew, req.body);
|
||||||
brew.textBin = zlib.deflateSync(req.body.text); // Compress brew text to binary before saving
|
brew.textBin = zlib.deflateSync(req.body.text); // Compress brew text to binary before saving
|
||||||
brew.text = ''; // Clear out the non-binary text field so its not saved twice
|
brew.text = ''; // Clear out the non-binary text field so its not saved twice
|
||||||
|
|
||||||
brew.updatedAt = new Date();
|
brew.updatedAt = new Date();
|
||||||
|
|
||||||
if(req.account) brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
|
if(req.account) brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
|
||||||
|
|
||||||
brew.markModified('authors');
|
brew.markModified('authors');
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const HomebrewSchema = mongoose.Schema({
|
|||||||
editId : { type: String, default: shortid.generate, index: { unique: true } },
|
editId : { type: String, default: shortid.generate, index: { unique: true } },
|
||||||
title : { type: String, default: '' },
|
title : { type: String, default: '' },
|
||||||
text : { type: String, default: '' },
|
text : { type: String, default: '' },
|
||||||
textBin : { type: Buffer },
|
textBin : { type: Buffer },
|
||||||
|
|
||||||
description : { type: String, default: '' },
|
description : { type: String, default: '' },
|
||||||
tags : { type: String, default: '' },
|
tags : { type: String, default: '' },
|
||||||
|
|||||||
Reference in New Issue
Block a user