From 444875bda7de0baf25ec84fe0b115af0d2199b69 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 19 Sep 2024 18:39:29 +0530 Subject: [PATCH] feat: pass fileName to integration credential path --- server/src/routes/integration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/routes/integration.ts b/server/src/routes/integration.ts index cc2c39df..3c9f8519 100644 --- a/server/src/routes/integration.ts +++ b/server/src/routes/integration.ts @@ -11,9 +11,9 @@ router.post('/upload-credentials', async (req, res) => { return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' }); } // *** TEMPORARILY WE STORE CREDENTIALS HERE *** - let integrations = loadIntegrations(); + let integrations = loadIntegrations(fileName); integrations = { fileName, spreadsheetId, range, credentials }; - saveIntegrations(integrations); + saveIntegrations(fileName, integrations); logger.log('info', 'Service account credentials saved successfully.'); return res.send(true); } catch (error: any) {