amilner42 / code-tidbit

Share Programming Knowledge Better
GNU General Public License v3.0
9 stars 1 forks source link

Review backend endpoints to make sure bandwidth-usage is minimal #160

Closed amilner42 closed 7 years ago

amilner42 commented 7 years ago

If we are simply returning the id or a boolean, and we don't need the inserted/edited document itself, then we shouldn't be using findAndUpdate... and instead we should just update....

Shouldn't take too long and will make sure our db-bandwidth usage is as little as possible.

amilner42 commented 7 years ago

Q&A was done after this issue, so it should be a good example of using correct mongo functions.