react and unreact
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user