Joey Baker
da6b3ce963
Feat (error) include hint on PG errors
...
Provides useful info!
2016-09-04 17:28:09 -07:00
Joey Baker
b032be20d1
Fix (error) always reply with an error #oops
...
We had a case where reply would never be called. This could case a
server hang.
2016-09-04 17:28:01 -07:00
Joey Baker
a9fa790ae9
Fix (deps): install babel-polyfill as optionalDep
...
We only require it if something else hasn't so this is a optionalDep.
2016-08-29 17:08:44 -07:00
Joey Baker
ce6f1fedde
Fix: bad merge in error.js
2016-08-28 09:57:23 -07:00
Joey Baker
db86507ef9
Fix: correct babel-polyfill version
...
This installs the babel-polyfill for babel 6. #oops
2016-08-28 09:56:46 -07:00
Joey Baker
0e9cd935b9
Add: parse Sequelize errors
...
This adds intelligence around sequelize errors to parse out the correct
error status code and ensure it's always formatted as a Boom error.
2016-08-25 21:28:23 -07:00
Joey Baker
6d289d6d78
Add: Better errors
...
Now looks at the error that comes back from sequelize and uses boom to
format the error in a more friendly way. This should yield useful error
messages instead of generic 500s.
2016-08-03 14:42:20 -07:00
Joey Baker
79b9fc1242
Change: permissions must always be an array
...
This allows us to set different configs per model. I should have thought
of this usecase when I first did permissions.
2016-07-22 11:50:08 -07:00
Joey Baker
f95f411a65
Add: permissions
...
It's now possible to limit the models rest routes are created for. This
is done via a `models` option that can be simple to complex. The readme
has been updated to reflect this.
2016-07-22 10:14:17 -07:00
Joey Baker
0416986896
Build: rm extraneous babel dep #oops
2016-07-22 09:52:21 -07:00
Joey Baker
2ea6c2e3a8
Fix: include option api correction
...
AFAIK, hapi-sequelize doesn't have a `request.models`, but it does have
a `request.getDb()` method that has `models` on it. This calls that
method to get the related models, but allows `request.models` to keep
working for backward compatibility.
2016-07-08 15:28:33 -07:00
Joey Baker
fee846eb4a
Fix: PUT requires a payload to work
2016-07-05 18:34:56 -07:00
Joey Baker
e7bc048a46
Internal: upgrade to babel6
...
Upgrades to babel 6. The major win (aside from some minor
performance gains), is that this module can now be `npm link`ed into a
babel 6 code base.
2016-07-05 14:47:44 -07:00
Joey Baker
0698a8a3ad
Fix: crud: GET id's can be strings or numbers
2016-06-29 21:30:27 -07:00
Joey Baker
3f419284be
Fix: Reply with 404 when required
2016-06-29 21:28:56 -07:00
Joey Baker
6958c49622
Build: install boom
2016-06-29 21:27:44 -07:00