update profiles
This commit is contained in:
@@ -12,6 +12,17 @@ userDB = (DB) => {
|
||||
});
|
||||
}
|
||||
|
||||
DB.updateProfile = async (profileid, profileObj) => {
|
||||
let tempProfile = profileObj.toObj();
|
||||
const query = {_id: profileid};
|
||||
const update = {$set: {profile: tempProfile.profile}};
|
||||
let r = await DB.profileCols.updateOne(query, update).catch((err) => {
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
return r;
|
||||
}
|
||||
|
||||
DB.getProfile = async (profileId) => {
|
||||
//if (userProfileCache[profileId] && !userProfileCache[profileId].isGroup) return userProfileCache[profileId];
|
||||
const _id = DB.ObjectID(profileId);
|
||||
|
||||
Reference in New Issue
Block a user