feat: handle write to sheet

This commit is contained in:
karishmas6
2024-09-17 22:38:32 +05:30
parent 00db87580e
commit 365ff8f9e1

View File

@@ -10,4 +10,13 @@ const handleUploadCredentials = async (credentials: any) => {
}
};
const handleWriteToSheet = async (spreadsheetId: any, range: any) => {
try {
await axios.post('http://localhost:8080/integration/write-to-sheet', { spreadsheetId, range });
alert('Data written to Google Sheet successfully.');
} catch (error) {
console.error('Error writing to Google Sheet:', error);
alert('Failed to write to Google Sheet.');
}
};