remove console.log
This commit is contained in:
@@ -199,6 +199,12 @@ userDB = (DB) => {
|
||||
return g ? g.isPrivate : false;
|
||||
}
|
||||
|
||||
DB.isOwnerOfGroup = async (profileid, groupid) => {
|
||||
let profile = await DB.getProfileCache(profileid);
|
||||
let group = userProfileCache[groupid] ? userProfileCache[groupid] : await DB.getGroup(groupid);
|
||||
return profile.userid == group.userid;
|
||||
}
|
||||
|
||||
DB.getGroup = async (groupid) => {
|
||||
const _id = DB.ObjectID(groupid);
|
||||
//if(userProfileCache[groupid]) return userProfileCache[groupid];
|
||||
@@ -238,7 +244,7 @@ userDB = (DB) => {
|
||||
}
|
||||
DB.followProfile(profileid, groupid)
|
||||
delete userProfileCache[groupid];
|
||||
return DB.profileCols.updateOne({_id}, update).then(console.log).catch((err)=>{
|
||||
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user