title: Async/Await Axios returns promise and not data?
body: <pre><code>export const isLoginValid = async token =&gt; {
    try {
      let result = await axios.post(API_URL + "/verify", null, {
        headers: { Authorization: "Bearer " + token }
      });
      return await result.data;
    } catch (error) {
      console.log("Unable to verify");
      return false;
    }
  };
  </code></pre>
  
  <p>I am using the code above to check if a user's login is valid. However, the return statement returns a Resolved Promise with the data inside the promise. Data needs to return true or false. Is there a way to unwrap the promise and just return the data?
  I'm fairly new to async/await. I've tried suggestions found in here but no matter what i try it returns a promise.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>By the way, this is not a duplicate, the suggested answer is not what my problem was. I had trouble getting the value from a async/await call using axios since it kept returning a promise.</p>
  
  <p>This helped me get the value from an async/await axios called.</p>
  
  <p><a href="https://stackoverflow.com/questions/51554461/async-await-in-axios">Async/Await in Axios</a></p>