feat: add proper types for params

This commit is contained in:
Naveen Pandey
2024-09-20 17:07:41 +05:30
committed by GitHub
parent 8754a87d0a
commit 95985a9d85

View File

@@ -1,7 +1,7 @@
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 +13,4 @@ export const handleUploadCredentials = async (fileName: any, credentials: any, s
console.error('Error uploading credentials:', error);
return false;
}
};
};