Skip to content

Conversation

CamposBruno
Copy link

Adiciona rota que lista onde estão faltando os suprimentos sobrando de um determinado abrigo

Copy link

@eltonfonseca eltonfonseca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

return { ...remaining, needing };
});

return await Promise.all(promises);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Em vez de Promise.all usar o Promise.allSettled, dessa forma é possível fazer um filtro em cima de todas as buscas que deram certo. Se usar o Promise.all se alguma das querys falhar ele já vai estourar uma exception.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants