fix following to be string id"

This commit is contained in:
Adolfo Reyna
2021-10-18 21:44:21 -07:00
parent 7da0f3093d
commit 30f9f59923
2 changed files with 4 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ userDB = (DB) => {
const _id = DB.ObjectID(profileId);
let update = {
$addToSet:{
following: followProfileId
following: followProfileId + '' //converts to str
}
}
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
@@ -103,7 +103,7 @@ userDB = (DB) => {
const _id = DB.ObjectID(profileId);
let update = {
$pull:{
following: followProfileId
following: followProfileId + '' //converts to str
}
}
return DB.profileCols.updateOne({_id}, update).catch((err)=>{