amilner42 / code-tidbit

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

`xDBActions` should have validation be optional #158

Closed amilner42 closed 7 years ago

amilner42 commented 7 years ago

We often use it internally, validation is only needed when we get data from the user.

amilner42 commented 7 years ago

Refer to qa.model.ts once it's merged to see how I handle optional validation.

Once we switch everything to optional validation, make sure every time we call the function internally (and not from a route endpoint) that we don't run validation. As well, for those functions where we no longer run validation, you no longer need to change IDs to string form, you can leave them as ObjectIDs because the validator won't be checking.