promise

  1. S

    Access URL in promise each

    I am using Bluebird.js and request-promise NPM module. I want to access promise URL or item.transactionID as in the code below. I try to find many things but failed to work How can we achieve this. paymentIDArray.forEach(item => { let p = rp({ uri: API +...
  2. H

    How to access requested body from another function with async/await?

    Sorry for the generic title. I'm pretty new to nodejs as well as the idea of async/await. So I have an express app, which makes an HTTP get request as a callback function. The callback function gets the body object, and returns it to getBody function. But when I try to assign getBody to a...
  3. F

    Promise in Promise function: Can't push data into Array

    I am using sequelizeJS. I have a Promise in Promise function. I want to make a Promise function to get data, then push this data into Array and return this Array. I tried with this code but it's not success. function sequelize_conversation (conversation_id, req) { return new Promise((resolve...
  4. K

    Nested queries in MYSQL and nodejs Async Issue

    I want to execute an sql query for every row of another query so i wrote a function like export function getLocations(req, res) { let appData = []; const database = new Database(); database.query('select * from districts') .then(rows => { rows.forEach(row => { const...
Top