add socker.io fore service-private
This commit is contained in:
parent
6818e0bb47
commit
0625a3929f
4 changed files with 35 additions and 3 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue