feat(simple): simple CRUD REST API (no associations)

feat(associations): one-to-one associations
feat(associations): one-to-many associations
This commit is contained in:
Mahdi Dibaiee
2016-01-18 18:08:43 +03:30
commit bae6820e64
11 changed files with 464 additions and 0 deletions

13
src/error.js Normal file
View File

@ -0,0 +1,13 @@
export default (target, key, descriptor) => {
let fn = descriptor.value;
descriptor.value = (request, reply) => {
try {
fn(request, reply);
} catch(e) {
reply(e);
}
}
return descriptor;
}