diff --git a/package.json b/package.json index de28055..87965e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mobx-rest", - "version": "0.0.8", + "version": "0.0.9", "description": "REST conventions for mobx.", "repository": { "type": "git", diff --git a/src/Collection.js b/src/Collection.js index 7bc76e8..566e1d4 100644 --- a/src/Collection.js +++ b/src/Collection.js @@ -133,6 +133,8 @@ class Collection { } else { this.add([data]) } + + return data }) .catch((body) => { if (model) this.remove([model.id]) @@ -157,6 +159,8 @@ class Collection { .then((data) => { this.request = null this.set(data, options) + + return data }) .catch((body) => { this.request = null diff --git a/src/Model.js b/src/Model.js index 36812c1..52cd060 100644 --- a/src/Model.js +++ b/src/Model.js @@ -56,6 +56,8 @@ class Model { .then((data) => { this.request = null this.set(data) + + return data }) .catch((body) => { this.request = null