Validate query and payload #20

Merged
joeybaker merged 14 commits from error-on-invalid-where into master 2016-09-06 18:29:40 +00:00

14 Commits

Author SHA1 Message Date
Joey Baker
3e9f024dcf Test: now testing get-config-for-method 2016-09-06 11:25:03 -07:00
Joey Baker
4c9ae36c5c Refactor: move get-config-for-method to a file 2016-09-06 11:24:41 -07:00
Joey Baker
4558ad1327 Chore (deps) update minors and patches
Not strictly necessary, but kinda nice to prove we're up-to-date
2016-09-06 09:25:02 -07:00
Joey Baker
edccfb2316 Chore (deps) update Joi 7 → 9
Shouldn't impact us
2016-09-06 07:28:43 -07:00
Joey Baker
0d8ab9f02e Chore (deps) update boom (major)
They just removed a method we don't use.
2016-09-06 07:28:43 -07:00
Joey Baker
f062e2b37f Fix (validation) params is a plain object
If we use a Joi object here, we can't use `defaultsDeep` to extend b/c
the joi prototype won't extend cleanly. We'd need to use joi's `contact`
method, but that gets really complicated and error prone. So, just use
a plain object which is more correct anyway.

http://hapijs.com/tutorials/validation
2016-09-06 07:28:43 -07:00
Joey Baker
69221ea331 Feat query & payload now validated 2016-09-06 07:28:43 -07:00
Joey Baker
f33c8da55d Fix (CRUD update) validate id 2016-09-06 07:28:43 -07:00
Joey Baker
833df49173 Chore add comments for config creation 2016-09-06 07:28:43 -07:00
Joey Baker
32a539c3d9 Fix (crud) update: findOnefindById
b/c `findById` uses an index to lookup, and should be fast.
2016-09-06 07:28:43 -07:00
Joey Baker
b35bd23c91 Fix: prefer user's config before our own 2016-09-06 07:28:43 -07:00
Joey Baker
b4ea8c5b8e Docs: add more details for include and where 2016-09-06 07:28:43 -07:00
Joey Baker
85cd2823da Docs: #cleanup and style fixes 2016-09-06 07:28:43 -07:00
Joey Baker
e0132c2cae Fix: handle all parseInclude errors 2016-09-06 07:28:43 -07:00