From 84f5a529236e662f9ddb6135d24853b06813cf21 Mon Sep 17 00:00:00 2001 From: hurxxxx Date: Wed, 16 Apr 2025 02:38:20 +0900 Subject: [PATCH] chore: clean up unnecessary code --- src/lib/utils/onedrive-file-picker.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/lib/utils/onedrive-file-picker.ts b/src/lib/utils/onedrive-file-picker.ts index 2771119ae..47b4e9627 100644 --- a/src/lib/utils/onedrive-file-picker.ts +++ b/src/lib/utils/onedrive-file-picker.ts @@ -31,22 +31,15 @@ class OneDriveConfig { } private async getCredentials(): Promise { - let response; + const headers: HeadersInit = { 'Content-Type': 'application/json' }; - if(window.location.hostname === 'localhost') { - response = await fetch('http://localhost:8080/api/config', { - headers, - credentials: 'include' - }); - } else { - response = await fetch('/api/config', { - headers, - credentials: 'include' - }); - } + const response = await fetch('/api/config', { + headers, + credentials: 'include' + }); if (!response.ok) { throw new Error('Failed to fetch OneDrive credentials');