ui: Replaces old request method with rpc. (#8298)
`rpc` is used to define how to make a HTTP request/response messages. This used to be called 'request' but the term is overused and sounded like only one leg of the message, so the naming was moved to `rpc` a while ago, this cleans up the places where we still used the old term.
This commit is contained in:
parent
fa524b9edb
commit
ea9701dbd5
|
@ -54,7 +54,7 @@ export default Adapter.extend({
|
|||
`;
|
||||
},
|
||||
clone: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, unserialized) {
|
||||
return adapter.requestForCloneRecord(request, serialized, unserialized);
|
||||
},
|
||||
|
|
|
@ -16,9 +16,4 @@ export default Adapter.extend({
|
|||
[DATACENTER_QUERY_PARAM]: dc,
|
||||
};
|
||||
},
|
||||
// TODO: Deprecated, remove `request` usage from everywhere and replace with
|
||||
// `HTTPAdapter.rpc`
|
||||
request: function(req, resp, obj, modelName) {
|
||||
return this.rpc(...arguments);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@ export default Adapter.extend({
|
|||
`;
|
||||
},
|
||||
queryLeader: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, unserialized) {
|
||||
return adapter.requestForQueryLeader(request, serialized, unserialized);
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ export default Adapter.extend({
|
|||
`;
|
||||
},
|
||||
authorize: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, unserialized) {
|
||||
return adapter.requestForAuthorize(request, serialized, unserialized);
|
||||
},
|
||||
|
|
|
@ -70,7 +70,7 @@ export default Adapter.extend({
|
|||
`;
|
||||
},
|
||||
authorize: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, unserialized) {
|
||||
return adapter.requestForAuthorize(request, serialized, unserialized);
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ export default Adapter.extend({
|
|||
);
|
||||
},
|
||||
logout: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, unserialized) {
|
||||
return adapter.requestForLogout(request, serialized, unserialized);
|
||||
},
|
||||
|
|
|
@ -130,7 +130,7 @@ export default Adapter.extend({
|
|||
// thing is its probably not the same shape as a 'Token',
|
||||
// plus we can't create Snapshots as they are private, see services/store.js
|
||||
self: function(store, type, id, unserialized) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, data) {
|
||||
return adapter.requestForSelf(request, serialized, data);
|
||||
},
|
||||
|
@ -142,7 +142,7 @@ export default Adapter.extend({
|
|||
);
|
||||
},
|
||||
clone: function(store, type, id, snapshot) {
|
||||
return this.request(
|
||||
return this.rpc(
|
||||
function(adapter, request, serialized, data) {
|
||||
return adapter.requestForCloneRecord(request, serialized, data);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue