feat: pass fileName

This commit is contained in:
karishmas6
2024-09-18 20:01:45 +05:30
parent 1c578bee4f
commit a1d672847f

View File

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