From 8c58b4c91c9d2bc98d388c89e3c0df2f113b731b Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Thu, 2 Sep 2021 16:24:19 -0700 Subject: [PATCH] react and unreact --- dbTools/post.js | 2 +- dbTools/profile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;