title: Retrieve Authenticate User's Orders
body: <ol>
  <li>GET method</li>
  <li>Use <code>accessToken</code> of an authenticated user.</li>
  <li>Only non-admin account can proceed.</li>
  <li>User should be able to retrieve his orders only.</li>
  </ol>
  <p><strong>Router</strong></p>
  <pre><code>router.get(&quot;/my-orders&quot;, auth.verify, (req, res) =&gt; {
  
      const user = auth.decode(req.headers.authorization);
  
      if (!user.isAdmin) {
  
          UserController.getMyOrders(req.body).then(getMine =&gt; res.send(getMine));
  
  
      } else {
  
          return res.status(403).send(&quot;Access denied.&quot;);
      }
  
  });```
  
  </code></pre>
  <p><strong>Controller</strong></p>
  <pre><code>module.exports.getMyOrders = (body) =&gt; {
  
      return User.find({}, {
          &quot;isAdmin&quot;: 0,
          &quot;_id&quot;: 0,
          &quot;password&quot;: 0
      });
  }
  </code></pre>
  <p>I am getting everything. Can someone help me code how to filter the user where the token belongs and retrieve his orders and not able to get other users' orders?</p>