remove console.log

This commit is contained in:
Adolfo Reyna
2021-10-18 22:18:54 -07:00
parent 30f9f59923
commit bf58c55e97
2 changed files with 14 additions and 3 deletions

View File

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