score:3

Accepted answer

You're using await with then(). You should switch to one. If you use await, assign the result to a variable. You should also be passing back the data of the response and not the response itself.

const response = await axios.post(...)
callback(response.data)

If you want to use then, then it's:

axios.post(...)
.then(respone => callback(response.data))

Related Query

More Query from same tag