0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

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

This commit is contained in:
Trevor Buckner
2021-06-10 14:22:12 -04:00
parent 19456e8be0
commit f80d5e6b52
5 changed files with 9420 additions and 50 deletions

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);
});
});
};