diff --git a/src/components/app/request-worker.ts b/src/components/app/request-worker.ts index 65972a8..1a4b25d 100644 --- a/src/components/app/request-worker.ts +++ b/src/components/app/request-worker.ts @@ -52,7 +52,7 @@ export class RequestWorker { */ async translationRequestHandler(e: CustomEvent) { const { text, resolve, reject } = e.detail; - const requestOptions = { + const requestOptions: RequestInit = { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -60,7 +60,7 @@ export class RequestWorker { body: JSON.stringify({ source: text }), - Credentials: 'include' + credentials: 'include' }; // Helper function to delay execution diff --git a/src/utils/api-manager.ts b/src/utils/api-manager.ts index c2f256d..4762fb5 100644 --- a/src/utils/api-manager.ts +++ b/src/utils/api-manager.ts @@ -198,9 +198,9 @@ export class APIManager { jmespathQuery: string; }): Promise => { // Fetch the blob - const requestOptions = { + const requestOptions: RequestInit = { method: 'GET', - Credentials: 'include' + credentials: 'include' }; const queryPath = new URLSearchParams(); @@ -262,9 +262,9 @@ export class APIManager { refreshRendererList = async () => { // Fetch the blob - const requestOptions = { + const requestOptions: RequestInit = { method: 'GET', - Credentials: 'include' + credentials: 'include' }; const response = await fetch(