Browse Source

chore: clean up unnecessary code

hurxxxx 3 months ago
parent
commit
84f5a52923
1 changed files with 5 additions and 12 deletions
  1. 5 12
      src/lib/utils/onedrive-file-picker.ts

+ 5 - 12
src/lib/utils/onedrive-file-picker.ts

@@ -31,22 +31,15 @@ class OneDriveConfig {
 	}
 
 	private async getCredentials(): Promise<void> {
-		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');