Merge pull request #33 from amhsirak/develop

chore: add proper param types
This commit is contained in:
Karishma Shukla
2024-09-20 17:10:06 +05:30
committed by GitHub

View File

@@ -1,7 +1,6 @@
import { default as axios } from "axios";
// todo: proper typescript types for params
export const handleUploadCredentials = async (fileName: any, credentials: any, spreadsheetId: any, range: any): Promise<boolean> => {
export const handleUploadCredentials = async (fileName: string, credentials: any, spreadsheetId: string, range: string): Promise<boolean> => {
try {
const response = await axios.post('http://localhost:8080/integration/upload-credentials', { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });
if (response.status === 200) {
@@ -13,4 +12,4 @@ export const handleUploadCredentials = async (fileName: any, credentials: any, s
console.error('Error uploading credentials:', error);
return false;
}
};
};