From a27df11c023c0a579fbbcc7fc6e424ced431528c Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon <taylor@taylorwilsdon.com> Date: Mon, 16 Dec 2024 15:11:05 -0500 Subject: [PATCH] Fix formatting --- src/lib/utils/google-drive-picker.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/utils/google-drive-picker.ts b/src/lib/utils/google-drive-picker.ts index df10eccf1..64b7f371b 100644 --- a/src/lib/utils/google-drive-picker.ts +++ b/src/lib/utils/google-drive-picker.ts @@ -1,20 +1,20 @@ -// Google Drive Picker API configuration +// Google Drive Picker API configuration let API_KEY = ''; let CLIENT_ID = ''; // Function to fetch credentials from backend config async function getCredentials() { - const response = await fetch('/api/config'); - if (!response.ok) { - throw new Error('Failed to fetch Google Drive credentials'); - } - const config = await response.json(); - API_KEY = config.google_drive?.api_key; - CLIENT_ID = config.google_drive?.client_id; - - if (!API_KEY || !CLIENT_ID) { - throw new Error('Google Drive API credentials not configured'); - } + const response = await fetch('/api/config'); + if (!response.ok) { + throw new Error('Failed to fetch Google Drive credentials'); + } + const config = await response.json(); + API_KEY = config.google_drive?.api_key; + CLIENT_ID = config.google_drive?.client_id; + + if (!API_KEY || !CLIENT_ID) { + throw new Error('Google Drive API credentials not configured'); + } } const SCOPE = [ 'https://www.googleapis.com/auth/drive.readonly',