feat: !accept values from req.body

This commit is contained in:
karishmas6
2024-09-17 21:10:01 +05:30
parent 0225529bc4
commit 48a9ced868

View File

@@ -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');