title: async bcrypt post request returns no response
body: <p>I am trying to compare password in order to login user, but i keep getting "this request has no response."</p>
  
  <p>this is my post route.</p>
  
  <pre><code>router.route("/login/:username1").post(async (req, res) =&gt; {
    const userexist = User.find(username=&gt;userexist.username=req.body.username1)
        if(userexist == null) 
        {
          return res.status(400).json("Cannot find user");
        }
        try 
        {
          if(await bcrypt.compare(req.body.password, userexist.password))
          {
            res.json("success");
          }
          else
          {
            res.json("Not Allowed");
          }
        } catch {
          res.status(500).json();
        }
  });
  </code></pre>
  
  <p>this is my post method from my login page.</p>
  
  <pre><code>onSubmit(e) {
      e.preventDefault();
      const isValid = this.validate();
      const username1=this.state.username;
      if (isValid) {
        const user = {
          username: this.state.username,
          password: this.state.password,
        };
  
        axios
        .post("http://localhost:5000/users/login/"+ username1, user)
        .then((res) =&gt; console.log(res.data));
        this.setState(initialState);
      }
    }
  </code></pre>