add socker.io fore service-private

This commit is contained in:
vankhaiphan 2021-05-30 22:34:41 +02:00
parent 6818e0bb47
commit 0625a3929f
4 changed files with 35 additions and 3 deletions

View file

@ -20,8 +20,10 @@ router.get("/:userId", async (req, res) => {
try {
const conversation = await Conversation.find({
members: { $in: [req.params.userId] },
// members: { $eq: [req.params.userId, "yuki"]},
});
res.status(200).json(conversation);
res.status(200).json(conversation[0]["_id"]);
}catch (err){
res.status(500).json(err)
}