标签: mongodb aggregation-framework
我将当前用户的ID存储在user变量中。如何使用match聚合获取当前用户的值
user
match
const user = req.user.id; const aggregation = await Notification.aggregate([ { $match: { userid: user } }, ])