UNDP-Accelerator-Labs / platform

GNU General Public License v3.0
1 stars 0 forks source link

Jb push missing file #222

Closed myjyby closed 6 months ago

myjyby commented 6 months ago

Added the missing file with Azure container functions, and moved it to helpers. I also fixes a few issues introduced by the async calls to vocabulary. The main issue I detected was, when adding return async (var) => inside a function (usually to then run a Promise.all()), passing the var through the internal function makes it undefined. It needs to be passed by the outer function. For example:

array.map(_ =>
  return async d => 
    await function(d)
)

fails because d is not passed by the array. It needs to be like:

array.map(d => 
  return async _ => 
    await function(d)
)

I tried to look for this kind of issue systematically, so I hope I have solved all of them. Maybe can you please take another quick look when you see this @JosuaKrause?