feat: pass fileName to integration credential path

This commit is contained in:
karishmas6
2024-09-19 18:39:29 +05:30
parent e2432255d0
commit 444875bda7

View File

@@ -11,9 +11,9 @@ router.post('/upload-credentials', async (req, res) => {
return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' }); return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' });
} }
// *** TEMPORARILY WE STORE CREDENTIALS HERE *** // *** TEMPORARILY WE STORE CREDENTIALS HERE ***
let integrations = loadIntegrations(); let integrations = loadIntegrations(fileName);
integrations = { fileName, spreadsheetId, range, credentials }; integrations = { fileName, spreadsheetId, range, credentials };
saveIntegrations(integrations); saveIntegrations(fileName, integrations);
logger.log('info', 'Service account credentials saved successfully.'); logger.log('info', 'Service account credentials saved successfully.');
return res.send(true); return res.send(true);
} catch (error: any) { } catch (error: any) {