我有一个mongoose模型的集合,我尝试使用uniq lodash函数从列表中获取唯一的I,但仍然得到相同的列表。列表元素是https://docs.mongodb.com/manual/reference/method/ObjectId/ const uniqueIds = uniq(ids) // not working
我正在尝试做一个检查,看看一个登录的用户的id req.user.id.是否在一个在req.params.id中签入的用户的关注者数组中,但由于某种原因它不起作用。user who is getting followed will be added to "user" type: mongoose.Schema.Types.ObjectIdrequired: true, },