feat: accept spreadsheetId and range

This commit is contained in:
karishmas6
2024-09-18 18:32:46 +05:30
parent 1421d5a50b
commit a32a562045

View File

@@ -1,9 +1,9 @@
import { default as axios } from "axios";
// todo: proper typescript types for params
export const handleUploadCredentials = async (credentials: any) => {
export const handleUploadCredentials = async (credentials: any, spreadsheetId: any, range: any) => {
try {
await axios.post('http://localhost:8080/integration/upload-credentials', { credentials: JSON.parse(credentials) });
await axios.post('http://localhost:8080/integration/upload-credentials', { credentials: JSON.parse(credentials), spreadsheetId, range });
alert('Service Account credentials saved successfully.');
} catch (error) {
console.error('Error uploading credentials:', error);