I'm facing an issue with socket hang up, by using this function below, When I use any one of the get queries it works well but when I used two get queries into two different collections then causes a socket hang up error. I don't wanna use Promise & then. In that case how I can get rid of this?
const getBooksForUser = async ({query: {memberID, role, guide}, headers}, res) => {
let books = await getBooks(role, guide, "Live")
let basicBooks =await getBasicBooks(role, guide, "Live");
let mergeCourses = [...books, ...basicBooks];
}