From c42dde5aacece1ba58facd2b6a1858db84225863 Mon Sep 17 00:00:00 2001 From: Tristan Manchester Date: Wed, 22 Apr 2026 04:24:44 +0200 Subject: [PATCH] Fix fetch credentials option casing --- src/components/app/request-worker.ts | 4 ++-- src/utils/api-manager.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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(