react and unreact

This commit is contained in:
Adolfo Reyna
2021-09-02 16:24:19 -07:00
parent 9a302a87de
commit 8c58b4c91c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ postDB = (DB)=>{
}); });
} }
DB.removeReaction = (postid, userid) => { DB.removeReaction = (postid, profileid) => {
const id = DB.ObjectID(postid); const id = DB.ObjectID(postid);
let update = { let update = {
$unset:{ $unset:{
+1 -1
View File
@@ -34,7 +34,7 @@ userDB = (DB) => {
DB.latestProfile = async (userId) => { DB.latestProfile = async (userId) => {
const userid = DB.ObjectID(userId); const userid = DB.ObjectID(userId);
let r = await DB.profileCols.find({ userid }) let r = await DB.profileCols.find({ userid })
.sort({ lastUpdate: -1 }).limit(1) .sort({ lastUpdate: -1 })
.toArray().catch((err) => { .toArray().catch((err) => {
console.log(err); console.log(err);
return false; return false;