fix: add missing parameter to delete requests from ExternalAPI (#904)
fix #903
This commit is contained in:
@@ -178,6 +178,7 @@ class ExternalAPI {
|
|||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
const url = this.formatUrl(endpoint, params);
|
const url = this.formatUrl(endpoint, params);
|
||||||
const response = await this.fetch(url, {
|
const response = await this.fetch(url, {
|
||||||
|
method: 'DELETE',
|
||||||
...config,
|
...config,
|
||||||
headers: {
|
headers: {
|
||||||
...this.defaultHeaders,
|
...this.defaultHeaders,
|
||||||
@@ -313,7 +314,11 @@ class ExternalAPI {
|
|||||||
try {
|
try {
|
||||||
return await response.json();
|
return await response.json();
|
||||||
} catch {
|
} catch {
|
||||||
|
try {
|
||||||
return await response.blob();
|
return await response.blob();
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user