From 95985a9d8544ae3236d96fefc6434038cc9747ed Mon Sep 17 00:00:00 2001 From: Naveen Pandey Date: Fri, 20 Sep 2024 17:07:41 +0530 Subject: [PATCH 1/2] feat: add proper types for params --- src/api/integration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/integration.ts b/src/api/integration.ts index 5a7432b6..0e6e1af6 100644 --- a/src/api/integration.ts +++ b/src/api/integration.ts @@ -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 => { +export const handleUploadCredentials = async (fileName: string, credentials: any, spreadsheetId: string, range: string): Promise => { 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; } -}; \ No newline at end of file +}; From dfbc5470e64ce5a1b8d3fd1e249d7ea612c0c278 Mon Sep 17 00:00:00 2001 From: Naveen Pandey Date: Fri, 20 Sep 2024 17:08:09 +0530 Subject: [PATCH 2/2] chore: remove todo --- src/api/integration.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api/integration.ts b/src/api/integration.ts index 0e6e1af6..2804508b 100644 --- a/src/api/integration.ts +++ b/src/api/integration.ts @@ -1,6 +1,5 @@ import { default as axios } from "axios"; -// todo: proper typescript types for params export const handleUploadCredentials = async (fileName: string, credentials: any, spreadsheetId: string, range: string): Promise => { try { const response = await axios.post('http://localhost:8080/integration/upload-credentials', { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });