Mongoose & Express: How to properly Remove, Create & Store data that are reference
问题 The first problem I am having is that whenever I try to delete the Comment, I also try to find the index of that specific comment inside post.comments as well as inside user.comments , it consistently returns -1, the reason why I am trying to find it, is so that I can splice it from the comments array that user and post do have. The second problem I am having is that whenever I create a comment, I try to store it in the comments array that user and post have, but it stores it only as a string