所以我有这个功能:
async function update_subscription_status(id) { await User.updateOne({chat_id: id}, { mailing: // need to change this boolean field to its opposite }) }
有什么方法可以在更新之前不检查其状态吗?
mongoose mongodb node.js mongodb-query
mongodb ×1
mongodb-query ×1
mongoose ×1
node.js ×1