I have a fetch method:
async fetch {
return await axios.get('/api/users');
}
This is called:
let data = this.fetch();
console.log(data);
But the log is a promise
- how can I get the log after the method call to log the data and not the promise, I thought async/await would wait for the promise to resolve?