Closed eatyourgreens closed 1 year ago
Remove the code that dynamically assigned Resource methods to ResourcePromise. Add a generic ResourcePromise.prototype.api method, and the following wrapper methods:
Resource
ResourcePromise
ResourcePromise.prototype.api
ResourcePromise.prototype.delete
ResourcePromise.prototype.get
ResourcePromise.prototype.save
ResourcePromise.prototype.update
This should fix API client errors where a resource, or set of resources, can't be fetched or modified by chaining client.type().get(). See https://github.com/zooniverse/Panoptes-Front-End/issues/6381 and https://github.com/zooniverse/Panoptes-Front-End/issues/6380.
client.type().get()
Remove the code that dynamically assigned
Resource
methods toResourcePromise
. Add a genericResourcePromise.prototype.api
method, and the following wrapper methods:ResourcePromise.prototype.delete
.ResourcePromise.prototype.get
.ResourcePromise.prototype.save
.ResourcePromise.prototype.update
.This should fix API client errors where a resource, or set of resources, can't be fetched or modified by chaining
client.type().get()
. See https://github.com/zooniverse/Panoptes-Front-End/issues/6381 and https://github.com/zooniverse/Panoptes-Front-End/issues/6380.