좋아요

    Node.js 좋아요, MongoDB

    Node.js 좋아요, MongoDB // 좋아요 // router.post("/like", async (req, res) => { const { post_Id } = req.body; const { token } = req.headers; let post_list = await Post.find({}); payload = jwt.verify(token, "team2-key"); const { name } = await User.findOne({ _id: payload.userId }); let { like_user } = await Post.findOne({ post_Id: post_Id }) let { like_count } = await Post.findOne({ post_Id: post_Id })..