瀏覽代碼

Merge pull request #17902 from Classic298/patch-1

fix: onedrive
Tim Jaeryang Baek 1 周之前
父節點
當前提交
b15db795e1
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/lib/utils/onedrive-file-picker.ts

+ 4 - 3
src/lib/utils/onedrive-file-picker.ts

@@ -3,7 +3,8 @@ import { v4 as uuidv4 } from 'uuid';
 
 class OneDriveConfig {
 	private static instance: OneDriveConfig;
-	private clientId: string = '';
+	private clientIdPersonal: string = '';
+	private clientIdBusiness: string = '';
 	private sharepointUrl: string = '';
 	private sharepointTenantId: string = '';
 	private msalInstance: PublicClientApplication | null = null;
@@ -49,8 +50,8 @@ class OneDriveConfig {
 		this.sharepointUrl = config.onedrive?.sharepoint_url;
 		this.sharepointTenantId = config.onedrive?.sharepoint_tenant_id;
 
-		if (!this.newClientIdPersonal && !this.newClientIdBusiness) {
-			throw new Error('OneDrive client ID not configured');
+		if (!this.clientIdPersonal && !this.clientIdBusiness) {
+		    throw new Error('OneDrive personal or business client ID not configured');
 		}
 	}