Categories
Mastering Development

Mongoose findOneAndUpdate not returning the updated object despite {new: true} option when using async/await

I have read almost every answer on SO regarding this, but I couldn’t find the solution to my problem. I think it has more to do with my inchoate understanding of promises. My express application is structured using MVC & services design pattern. I have a following service method, which concerns me: const incrementPoolSize = […]