removes unnecessary #fetchUrl call#100
Conversation
| // use resource's service if in container, otherwise use this service to fetch | ||
| let owner = (typeof getOwner === 'function') ? getOwner(this) : this.container; | ||
| let service = owner.lookup('service:' + pluralize(type)) || this; | ||
| url = this.fetchUrl(url); |
There was a problem hiding this comment.
@aars I'm pretty sure this is the hook I use to be sure that when a proxy server is in use the url in the payload for the relationship is replaced with the url of the proxy server.
There was a problem hiding this comment.
I'm pretty sure this is that hook. In adapter.fetch itself, which is good.
There was a problem hiding this comment.
@aars I'll need to step trough the call stack for a request to updateRelationship (PATCH) I think that relationship requests do not use adapter.fetch.
There was a problem hiding this comment.
updateRelationship calls patchRelationship which calls fetch
Even if updateRelationship's stack did not call fetch, I removed fetchUrl from findRelated, which is unrelated to updateRelationship or patchRelationship.
But do check to be sure.
Found this redundant #fetchUrl call when researching it's usage after this comment/issue