Skip to content

Commit

Permalink
XHR keys need to include the method as well
Browse files Browse the repository at this point in the history
The URL alone doesn't guarantee uniqueness
  • Loading branch information
DingoEatingFuzz committed May 22, 2018
1 parent 173a2b9 commit ee4aa99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ui/app/adapters/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export default Watchable.extend({
xhrKey(url, method, options = {}) {
const namespace = options.data && options.data.namespace;
if (namespace) {
return `${url}?namespace=${namespace}`;
return `${method} ${url}?namespace=${namespace}`;
}
return url;
return `${method} ${url}`;
},

relationshipFallbackLinks: {
Expand Down
4 changes: 2 additions & 2 deletions ui/app/adapters/watchable.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default ApplicationAdapter.extend({
return ajaxOptions;
},

xhrKey(url /* method, options */) {
return url;
xhrKey(url, method /* options */) {
return `${method} ${url}`;
},

findAll(store, type, sinceToken, snapshotRecordArray, additionalParams = {}) {
Expand Down

0 comments on commit ee4aa99

Please sign in to comment.