From 48a9ced868341fc645e3063dc8bb0cb05ef3b84c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 17 Sep 2024 21:10:01 +0530 Subject: [PATCH] feat: !accept values from req.body --- server/src/routes/integration.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/routes/integration.ts b/server/src/routes/integration.ts index ee38c369..f1659e13 100644 --- a/server/src/routes/integration.ts +++ b/server/src/routes/integration.ts @@ -20,7 +20,13 @@ router.post('/upload-credentials', (req, res) => { router.post('/write-to-sheet', async (req, res) => { try { - const { spreadsheetId, range, values } = req.body; + const { spreadsheetId, range } = req.body; + + // Todo: remove this. This is just for testing purposes. + const values = [ + ['Scraped Data 1', 'More Data'], + ['Scraped Data 2', 'More Data'], + ]; // Load the stored credentials const credentialsPath = path.join(__dirname, 'service_account_credentials.json');