Fix sanitizing brews in user page, hide own G brews on other profiles

This commit is contained in:
Trevor Buckner committed 2021-06-10 14:22:12 -04:00
1 parent 19456e8be0
commit f80d5e6b52
5 files changed
+9420 -50

No files matched your search

+1 -3
View File
@@ -58,9 +58,7 @@ HomebrewSchema.statics.getByUser = function(username, allowAccess=false){
}
Homebrew.find(query, (err, brews)=>{
if(err) return reject('Can not find brew');
return resolve(_.map(brews, (brew)=>{
return brew.sanatize(!allowAccess);
}));
return resolve(brews);
});
});
};