title: Mongoose updateOne() going through okay but not updating
body: <p>I have this request:</p>
  <pre><code>// PUT that updates a user. 
  router.put('/api/user/:id', async (req: Request, res: Response) =&gt; {
      const { email, name, avatar } = req.body
  
      const userId = req.body._id
      const conditions = {
          _id : userId
      }
  
      const user = {$set: { &quot;email&quot;: email, &quot;name&quot;: name, &quot;avatar&quot;: avatar } }
      
      User.updateOne(conditions, user).then(doc =&gt; {
          if (!doc) { return res.status(404).end() }
          return res.status(200).json(doc)
      }).catch(error =&gt; console.log(error))
  })
  </code></pre>
  <p>And I get this response from the request:</p>
  <pre><code>{
      &quot;n&quot;: 0,
      &quot;nModified&quot;: 0,
      &quot;ok&quot;: 1
  }
  </code></pre>
  <p>If you can find it on StackOverflow about the <code>updateOne()</code> method in mongoose I've probably tried it. The document isn't updating no matter what I try.</p>
  <p>Edit: I've tried using an ObjectID in the query instead and the same result.</p>
  <p>Edit 2: I figured it out. Was using req.body.id instead of req.params.id and I was using parameters to send the request. Thanks everyone for the help!</p>