Ability to change data for courses
This commit is contained in:
@@ -15,7 +15,12 @@ userDB = (DB) => {
|
||||
DB.updateProfile = async (profileid, profileObj) => {
|
||||
let tempProfile = profileObj.toObj();
|
||||
const query = {_id: profileid};
|
||||
const update = {$set: {profile: tempProfile.profile}};
|
||||
const update = {
|
||||
$set: {
|
||||
profile: tempProfile.profile,
|
||||
data: tempProfile.data
|
||||
}
|
||||
};
|
||||
let r = await DB.profileCols.updateOne(query, update).catch((err) => {
|
||||
console.log(err);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user