Open rinoma opened 7 years ago
updateRating(category, mentorScore1, mentorId1, (error, result1) => { if (error) { return console.log(error); } else { return updateRating(category, mentorScore2, mentorId2, (error, result2) => { if (error) { return console.log(error); } else { return updateRespectiveScore(category, mentorName2, mentorScore1, mentorId1, (error, result3) => { if (error) { return console.log(error); } else { return updateRespectiveScore(category, mentorName1, mentorScore2, mentorId2, (error, response1) => { if (error) { return console.log(error); } else { callbackResult(null, {result__1: result3, result__2: response1}) } }) } }) } }) } }) }
maybe a few promises?