So I have this function:
async function update_subscription_status(id) {
await User.updateOne({chat_id: id}, {
mailing: // need to change this boolean field to its opposite
})
}
Is there any way to do it without checking its state before updating?