Fix post likes
This commit is contained in:
@@ -38,7 +38,7 @@ postDB = (DB)=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DB.newReaction = (songId, profileid, reaction) => {
|
DB.newReactionInSong = (songId, profileid, reaction) => {
|
||||||
if(!DB.ObjectID.isValid(songId)) return false;
|
if(!DB.ObjectID.isValid(songId)) return false;
|
||||||
const id = DB.ObjectID(songId);
|
const id = DB.ObjectID(songId);
|
||||||
let update = {
|
let update = {
|
||||||
@@ -53,7 +53,7 @@ postDB = (DB)=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DB.removeReaction = (songId, profileid) => {
|
DB.removeReactionInSong = (songId, profileid) => {
|
||||||
if(!DB.ObjectID.isValid(songId)) return false;
|
if(!DB.ObjectID.isValid(songId)) return false;
|
||||||
const id = DB.ObjectID(songId);
|
const id = DB.ObjectID(songId);
|
||||||
let update = {
|
let update = {
|
||||||
@@ -70,7 +70,7 @@ postDB = (DB)=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DB.newComment = (songId, comment) => {
|
DB.newCommentInSong = (songId, comment) => {
|
||||||
if(!DB.ObjectID.isValid(songId)) return false;
|
if(!DB.ObjectID.isValid(songId)) return false;
|
||||||
const id = DB.ObjectID(songId);
|
const id = DB.ObjectID(songId);
|
||||||
return DB.songsCol.updateOne({_id: id}, {
|
return DB.songsCol.updateOne({_id: id}, {
|
||||||
@@ -86,7 +86,7 @@ postDB = (DB)=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DB.newCommentReaction = (songId, commentDate, profileid, reaction) => {
|
DB.newCommentReactionInSong = (songId, commentDate, profileid, reaction) => {
|
||||||
if(!DB.ObjectID.isValid(songId)) return false;
|
if(!DB.ObjectID.isValid(songId)) return false;
|
||||||
const id = DB.ObjectID(songId);
|
const id = DB.ObjectID(songId);
|
||||||
let update = {
|
let update = {
|
||||||
@@ -105,7 +105,7 @@ postDB = (DB)=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DB.removeCommentReaction = (songId, commentDate, profileid) => {
|
DB.removeCommentReactionInSong = (songId, commentDate, profileid) => {
|
||||||
if(!DB.ObjectID.isValid(songId)) return false;
|
if(!DB.ObjectID.isValid(songId)) return false;
|
||||||
const id = DB.ObjectID(songId);
|
const id = DB.ObjectID(songId);
|
||||||
let update = {
|
let update = {
|
||||||
|
|||||||
Reference in New Issue
Block a user