by ramblerman · 7y ago · 0 comments
I'm not sure this is correct. Getting to this line already implies they are done, as the await will block. You could just put res.send() on this line no?
There are also some other incorrect things in that post that makes the code overly complicated, like:
> Every async function needs a new Promise, and needs to resolve()
That's definitely not needed unless you call something that runs asynchronously without being `async` or returning a standard `Promise` (in which case you could probably use a generic wrapper to convert them to `Promise` objects and avoid having to do that everytime).