Hi, Kate
Can you please help me with this one
i receive data from an axios call collect it in a variable and return it when i call the function i receive data as promise like you showed
i put async await everything you said but this isn't working
$(document).ready(function () {
merchantDetails;
var load = merchantDetails(userName)
console.log(load)
})
merchantDetails = function (userName) {
var axiosResponse = axios.get("/adminMerchantOrderDetails/merchantDetails?username=" + userName).then(function (response) {
let order = response.data.responseData;
return order
console.log((order))
})
return axiosResponse
}
Freelancer, Full-stack developer (React.js / React Native / TypeScript / Node.js). I've come to specialize in developing Dashboards, Administrative Panels, CRM systems, and similar apps.
Hi Sadaf! It's kinda hard to understand this unformatted piece of code. Could you please provide a link to a codesanbox, GitHub repo or something like that so I could take a look and try to help you?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, Kate
Can you please help me with this one
i receive data from an axios call collect it in a variable and return it when i call the function i receive data as promise like you showed
i put async await everything you said but this isn't working
$(document).ready(function () {
merchantDetails;
var load = merchantDetails(userName)
console.log(load)
})
merchantDetails = function (userName) {
var axiosResponse = axios.get("/adminMerchantOrderDetails/merchantDetails?username=" + userName).then(function (response) {
let order = response.data.responseData;
return order
console.log((order))
})
return axiosResponse
}
Hi Sadaf! It's kinda hard to understand this unformatted piece of code. Could you please provide a link to a codesanbox, GitHub repo or something like that so I could take a look and try to help you?