fix: add missing parameter to delete requests from ExternalAPI (#904)

fix #903
This commit is contained in:
Gauthier
2024-07-30 00:43:40 +02:00
committed by GitHub
parent d5f817e734
commit 36d98a2681

View File

@@ -178,6 +178,7 @@ class ExternalAPI {
): Promise<T> {
const url = this.formatUrl(endpoint, params);
const response = await this.fetch(url, {
method: 'DELETE',
...config,
headers: {
...this.defaultHeaders,
@@ -313,7 +314,11 @@ class ExternalAPI {
try {
return await response.json();
} catch {
return await response.blob();
try {
return await response.blob();
} catch {
return null;
}
}
}
}