nodejs controller calling another controller, but refuse to wait for promises

Cancelado Publicado hace 6 años Pagado a la entrega
Cancelado Pagado a la entrega

We have one nodejs controller "getFrontpage"which gets all the data we need for the front page.

One array is a list of HotDeals and each HotDeal needs a price.

In order to find the prices we call the big "getPrice" controller for each of the records in HotDeal and add the price to the array.

This all works great, except for one thing... No matter what we do the getFrontpage controller returns the full result to the route caller BEFORE the getPrice promises are done.

So it do get the price for each HotDeal, and it also add them to the HotDeal array. But it does so AFTER getFrontpage has already completed.

For some reason we simply cannot make getFrontpage wait for the getPrice calls to finish before it moves on.

Description of requirements/features: You need to be VERY good with promises in Nodejs.

JavaScript Node.js

Nº del proyecto: #14217056

Sobre el proyecto

12 propuestas Proyecto remoto Activo hace 6 años

12 freelancers están ofertando un promedio de $202 por este trabajo

wenmobile3

Hello! I have reviewed your job description as well and I am very confident to handle this project perfectly. I believe that I can be the best productive candidate for this requirement. I am a professional PHP dev Más

$155 USD en 3 días
(12 comentarios)
5.4
fashionsoft

Hello Sir,  I have just read your project description and understood all the basic requirements mentioned in there as I have more than 10 years of experience in this field.  So can we please discuss more now to get st Más

$550 USD en 7 días
(10 comentarios)
4.8
rajdeepa555

Hello Sir, I got your point regarding the promises, this is a very basic problem when we work with javascript frameworks, like nodejs, angularjs and so on, you need to define a generic function and pass your request Más

$100 USD en 3 días
(14 comentarios)
4.8
arksong123

Hi, I am a serious developer who aims to provide high quality services. If you contact me, we can discuss more things detail and will be achieved with each other's purpose. Good luck for your business…

$155 USD en 2 días
(10 comentarios)
4.2
alimohyudin

Hi, I'm Ali, I can help you in creating this kind of Node.js application with as minimum cost as possible, I'm trying to compete big fishes on Freelancer so I'll try my best to provide you as good quality and good Más

$250 USD en 3 días
(16 comentarios)
4.3
DemonDeveloper

i am VERY good with promises in Nodejs. We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. Más

$100 USD en 1 día
(14 comentarios)
3.4
Shopify

Hello, I want to show you all relevant Demo and Designs which is similar to your project completed previously. To make sure about the requirement set and customizations, I want to discuss this project with you further Más

$257 USD en 3 días
(4 comentarios)
2.9