Joey Baker
a5e6b2dd46
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-05 18:33:03 -07:00
Mahdi Dibaiee
07af23cb5a
chore(eslint): use eslint for a more consistent style throughout the code
2016-06-30 18:28:02 +04:30
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
Ruben Paz
2fd7fa09b0
Replace defaults by defaultsDeep
2016-06-05 17:51:54 +01:00
Ruben Paz
9a28dbcc02
Added defaultConfig parameter to the options
2016-06-05 14:44:24 +01:00
Mahdi Dibaiee
dd0084277b
fix: actually run destroyAll
:|
2016-05-07 10:41:30 +04:30
Mahdi Dibaiee
193aec9619
fix(crud): DELETE plural
2016-05-07 10:37:51 +04:30
Mahdi Dibaiee
dc5a010408
fix(crud): typo
2016-03-12 11:05:04 +03:30
Mahdi Dibaiee
5551d416a8
fix(crud): single instance requests were failing, not taking id into account
2016-03-12 10:52:47 +03:30
Mahdi Dibaiee
11291f0e08
refactor: minimize repeated code by re-using parseInclude
, parseWhere
and getMethod
...
feat(include): ability to specify multiple includes, as an array
2016-03-10 10:48:30 +03:30
Mahdi Dibaiee
5db3bb4eb3
feat(operators): ability to use sequelize operators in queries
2016-02-01 16:46:30 +03:30
Mahdi Dibaiee
6cfe877884
feat(include): include query parameter, passed to sequelize query
...
fix(associations): one-to-many associations -> destroyScope and get
2016-01-29 11:30:39 +03:30
Mahdi Dibaiee
52ad030d0d
feat(associations): many-to-many associations
...
fix(associations): fix association queries, must use `include` instead of ForeignKey
fix(error): error decorator was missing await, which prevented it from catching errors
fix(error): console.error the error
refactor(crud): don't use `request.models[name]`, use the model directly
chore: README added
2016-01-19 10:03:29 +03:30
Mahdi Dibaiee
bae6820e64
feat(simple): simple CRUD REST API (no associations)
...
feat(associations): one-to-one associations
feat(associations): one-to-many associations
2016-01-18 18:08:43 +03:30