mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-21 21:06:58 +00:00
Fix sanitizing brews in user page, hide own G brews on other profiles
This commit is contained in:
1 parent
19456e8be0
commit
f80d5e6b52
5 files changed
+9420
-50
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user