flyvictor / fortune

A framework for prototyping hypermedia APIs.
http://fortunejs.com
MIT License
4 stars 18 forks source link

Custom type should insert itself into hooks as necessary #162

Open craigedmunds opened 9 years ago

craigedmunds commented 9 years ago

Example of custom types in https://github.com/Azzoo/fortune/blob/patch-3/test/app.js

If a custom type is registered, it should have the opportunity to participate in the read/write fortune lifecycle to manipulate the data travelling into & out of the API.

This will avoid the need to manually add hooks to each resource to do any manipulations (provide our date example as a starting point)

dmskr commented 8 years ago

closed here: https://github.com/flyvictor/fortune/pull/180 and here: https://github.com/flyvictor/fortune/pull/181