Skip to content

Commit

Permalink
Pass options to jsonapi() in bulkSave for relationships [Ref #1737168…
Browse files Browse the repository at this point in the history
…95] (#64)

* Pass options to jsonapi() in bulkSave for relationships

* Version bump

* Update docs

* doc update 2
  • Loading branch information
julienfitz authored Jul 31, 2020
1 parent 5fa2a95 commit 9a58d4e
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/mobx-async-store.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ function () {
url = _this.fetchUrl(type, queryParams, null); // convert records to an appropriate jsonapi attribute/relationship format

recordAttributes = records.map(function (record) {
return record.jsonapi();
return record.jsonapi(options);
}); // build a data payload

body = JSON.stringify({
Expand Down
2 changes: 1 addition & 1 deletion dist/mobx-async-store.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ function () {
url = _this.fetchUrl(type, queryParams, null); // convert records to an appropriate jsonapi attribute/relationship format

recordAttributes = records.map(function (record) {
return record.jsonapi();
return record.jsonapi(options);
}); // build a data payload

body = JSON.stringify({
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Model.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/RelatedRecordsArray.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Store.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "mobx-async-store",
"description": "Asyc Data Store for mobx",
"url": "https://github.com/artemis-ag/mobx-async-store",
"version": "2.0.0"
"version": "2.0.1"
},
"files": {
"src/decorators/attributes.js": {
Expand Down
2 changes: 1 addition & 1 deletion docs/files/src_Model.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
4 changes: 2 additions & 2 deletions docs/files/src_Store.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down Expand Up @@ -198,7 +198,7 @@ <h1 class="file-heading">File: src/Store.js</h1>
const url = this.fetchUrl(type, queryParams, null)

// convert records to an appropriate jsonapi attribute/relationship format
const recordAttributes = records.map((record) =&gt; record.jsonapi())
const recordAttributes = records.map((record) =&gt; record.jsonapi(options))

// build a data payload
const body = JSON.stringify({ data: recordAttributes })
Expand Down
2 changes: 1 addition & 1 deletion docs/files/src_decorators_attributes.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/files/src_decorators_relationships.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/files/src_schema.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/files/src_utils.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="./assets/css/logo.png" title="mobx-async-store" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 2.0.0</em>
<em>API Docs for: 2.0.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@artemisag/mobx-async-store",
"version": "2.0.0",
"version": "2.0.1",
"module": "dist/mobx-async-store.esm.js",
"browser": "dist/mobx-async-store.cjs.js",
"main": "dist/mobx-async-store.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion src/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Store {
const url = this.fetchUrl(type, queryParams, null)

// convert records to an appropriate jsonapi attribute/relationship format
const recordAttributes = records.map((record) => record.jsonapi())
const recordAttributes = records.map((record) => record.jsonapi(options))

// build a data payload
const body = JSON.stringify({ data: recordAttributes })
Expand Down

0 comments on commit 9a58d4e

Please sign in to comment.