feat: accept spreadsheetId and range
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user