diff --git a/apps/platform/src/lib/api-client.ts b/apps/platform/src/lib/api-client.ts index fb0a8a10..410f1864 100644 --- a/apps/platform/src/lib/api-client.ts +++ b/apps/platform/src/lib/api-client.ts @@ -70,6 +70,22 @@ class APIClient { credentials: 'include' }) } + + /** + * Sends a DELETE request to the specified URL and returns a Promise that resolves to the response data. + * + * @param url - The URL to send the DELETE request to. + * @returns A Promise that resolves to the response data. + */ + delete(url: string): Promise { + return this.request(url, { + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + credentials: 'include' + }) + } } export const apiClient = new APIClient(