diff --git a/dbTools/post.js b/dbTools/post.js index 3005edc..9cc13d4 100644 --- a/dbTools/post.js +++ b/dbTools/post.js @@ -25,7 +25,7 @@ postDB = (DB)=>{ }); } - DB.removeReaction = (postid, userid) => { + DB.removeReaction = (postid, profileid) => { const id = DB.ObjectID(postid); let update = { $unset:{ diff --git a/dbTools/profile.js b/dbTools/profile.js index 695398f..429c4ef 100644 --- a/dbTools/profile.js +++ b/dbTools/profile.js @@ -34,7 +34,7 @@ userDB = (DB) => { DB.latestProfile = async (userId) => { const userid = DB.ObjectID(userId); let r = await DB.profileCols.find({ userid }) - .sort({ lastUpdate: -1 }).limit(1) + .sort({ lastUpdate: -1 }) .toArray().catch((err) => { console.log(err); return false;