No need of promise all for country search


We can remove the Promise.all by modifying the DTO to accept an array of country names, allowing us to retrieve the data using a single MongoDB query.
- Domain
- Profile
- Action
- refactor
- Department
- Backend


We can remove the Promise.all by modifying the DTO to accept an array of country names, allowing us to retrieve the data using a single MongoDB query.
Log in to comment and vote
Comments3
Zelalem Habtamu
Apr 28, 2025
so you will have an array names in the dto. right @Yohannes Bekele
[Deleted User]
Apr 28, 2025
Yes @Zelalem Habtamu , we will have array of names.
Rambod Rahmani
May 2, 2025
Independently from the DTO, the important thing is the DB find query which is executed multiple timers. Please start this goal @Zelalem Habtamu