Skip to content

Commit 127bded

Browse files
committed
0.16.1
1 parent 31674af commit 127bded

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

dist/mobx-spine.es.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
map,
2121
mapKeys,
2222
mapValues,
23+
omit,
2324
result,
2425
sortBy,
2526
uniq,
@@ -461,6 +462,7 @@ var Store = (
461462
.fetchStore({
462463
url: result(this, 'url'),
463464
data: data,
465+
requestOptions: omit(options, 'data'),
464466
})
465467
.then(
466468
action(function(res) {
@@ -1814,7 +1816,11 @@ var Model = (
18141816
options.data
18151817
);
18161818
return this.__getApi()
1817-
.fetchModel({ url: this.url, data: data })
1819+
.fetchModel({
1820+
url: this.url,
1821+
data: data,
1822+
requestOptions: omit(options, 'data'),
1823+
})
18181824
.then(
18191825
action(function(res) {
18201826
_this14.fromBackend(res);
@@ -2154,9 +2160,10 @@ var BinderApi = (function() {
21542160
key: 'fetchModel',
21552161
value: function fetchModel(_ref) {
21562162
var url = _ref.url,
2157-
data = _ref.data;
2163+
data = _ref.data,
2164+
requestOptions = _ref.requestOptions;
21582165

2159-
return this.get(url, data).then(function(res) {
2166+
return this.get(url, data, requestOptions).then(function(res) {
21602167
return {
21612168
data: res.data,
21622169
repos: res.with,
@@ -2260,9 +2267,10 @@ var BinderApi = (function() {
22602267
key: 'fetchStore',
22612268
value: function fetchStore(_ref5) {
22622269
var url = _ref5.url,
2263-
data = _ref5.data;
2270+
data = _ref5.data,
2271+
requestOptions = _ref5.requestOptions;
22642272

2265-
return this.get(url, data).then(function(res) {
2273+
return this.get(url, data, requestOptions).then(function(res) {
22662274
return {
22672275
data: res.data,
22682276
repos: res.with,

dist/mobx-spine.umd.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@
460460
.fetchStore({
461461
url: lodash.result(this, 'url'),
462462
data: data,
463+
requestOptions: lodash.omit(
464+
options,
465+
'data'
466+
),
463467
})
464468
.then(
465469
mobx.action(function(res) {
@@ -1896,7 +1900,14 @@
18961900
options.data
18971901
);
18981902
return this.__getApi()
1899-
.fetchModel({ url: this.url, data: data })
1903+
.fetchModel({
1904+
url: this.url,
1905+
data: data,
1906+
requestOptions: lodash.omit(
1907+
options,
1908+
'data'
1909+
),
1910+
})
19001911
.then(
19011912
mobx.action(function(res) {
19021913
_this14.fromBackend(res);
@@ -2244,9 +2255,12 @@
22442255
key: 'fetchModel',
22452256
value: function fetchModel(_ref) {
22462257
var url = _ref.url,
2247-
data = _ref.data;
2258+
data = _ref.data,
2259+
requestOptions = _ref.requestOptions;
22482260

2249-
return this.get(url, data).then(function(res) {
2261+
return this.get(url, data, requestOptions).then(function(
2262+
res
2263+
) {
22502264
return {
22512265
data: res.data,
22522266
repos: res.with,
@@ -2352,9 +2366,12 @@
23522366
key: 'fetchStore',
23532367
value: function fetchStore(_ref5) {
23542368
var url = _ref5.url,
2355-
data = _ref5.data;
2369+
data = _ref5.data,
2370+
requestOptions = _ref5.requestOptions;
23562371

2357-
return this.get(url, data).then(function(res) {
2372+
return this.get(url, data, requestOptions).then(function(
2373+
res
2374+
) {
23582375
return {
23592376
data: res.data,
23602377
repos: res.with,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobx-spine",
3-
"version": "0.16.0",
3+
"version": "0.16.1",
44
"license": "ISC",
55
"author": "Kees Kluskens <kees@webduck.nl>",
66
"description": "MobX with support for models, relations and an API.",

0 commit comments

Comments
 (0)