0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 18:42:40 +00:00
Accidentally broke sharing.
This commit is contained in:
Trevor Buckner
2020-10-19 16:56:34 -04:00
parent 5e2fdcf1e9
commit 40d120d875

View File

@@ -38,11 +38,13 @@ HomebrewSchema.methods.increaseView = function(){
return new Promise((resolve, reject)=>{
this.lastViewed = new Date();
this.views = this.views + 1;
const text = this.text;
this.text = undefined;
this.save((err)=>{
if(err) return reject(err);
return resolve(this);
});
this.text = text;
});
};