Skip to content

Commit

Permalink
temp/searchforpollcommentreplies now returns isOwner property
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Oct 12, 2023
1 parent 05a2b84 commit 5ac16d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/Temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,15 @@ class TempController {
datePosted: item.datePosted,
profileImageKey: user.profileImageKey,
commentUpVoted: commentUpVoted,
commentDownVoted: commentDownVoted
commentDownVoted: commentDownVoted,
isOwner: String(item.commenterId) === String(userId)
})
} else {
console.error("A comment exists but it's creator's account has been deleted. This comment must be deleted immediately. Comment id:", item._id, ' User Id:', item.commenterId)
}
}

sendResponse(nameSendBackObject)
}).catch(error => {
console.error('An error occurred while finding users with an id inside of this array:', uniqueUsers, '. The error was:', error)
return resolve(HTTPWTHandler.serverError('An error occurred while finding comment creators. Please try again.'))
Expand Down

0 comments on commit 5ac16d3

Please sign in to comment.