ethanresnick / json-api

Turn your node app into a JSON API server (http://jsonapi.org/)
GNU Lesser General Public License v3.0
268 stars 41 forks source link

callbacks should accept a promise as a return value #120

Closed ficoos closed 8 years ago

ficoos commented 8 years ago

Sometimes in the callbacks (like beforeSave) you might want to do something that will be asynchronous. It should be possible to return a promise and not have to do the entire phase synchronously.

ficoos commented 8 years ago

Sorry apparently you can already do that.