From 6312753d77185b16ccba63910d4fe0e5e9bb536a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 17 Sep 2024 22:36:40 +0530 Subject: [PATCH] feat: handle upload credentials --- src/api/interpretation.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/api/interpretation.ts diff --git a/src/api/interpretation.ts b/src/api/interpretation.ts new file mode 100644 index 00000000..7c83b37f --- /dev/null +++ b/src/api/interpretation.ts @@ -0,0 +1,13 @@ +import { default as axios } from "axios"; + +const handleUploadCredentials = async (credentials: any) => { + try { + await axios.post('http://localhost:8080/integration/upload-credentials', { credentials: JSON.parse(credentials) }); + alert('Service Account credentials saved successfully.'); + } catch (error) { + console.error('Error uploading credentials:', error); + alert('Failed to upload credentials.'); + } + }; + +