feat: handle upload credentials

This commit is contained in:
karishmas6
2024-09-17 22:36:40 +05:30
parent 48a9ced868
commit 6312753d77

13
src/api/interpretation.ts Normal file
View File

@@ -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.');
}
};