feat: add proper types for params
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user