feat: !alerts
This commit is contained in:
@@ -5,14 +5,12 @@ export const handleUploadCredentials = async (fileName: any, credentials: any, s
|
|||||||
try {
|
try {
|
||||||
const response = await axios.post('http://localhost:8080/integration/upload-credentials', { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });
|
const response = await axios.post('http://localhost:8080/integration/upload-credentials', { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
alert('Service Account credentials saved successfully.');
|
|
||||||
return response.data;
|
return response.data;
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Couldn't make gsheet integration for ${fileName}`);
|
throw new Error(`Couldn't make gsheet integration for ${fileName}`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error uploading credentials:', error);
|
console.error('Error uploading credentials:', error);
|
||||||
alert('Failed to upload credentials.');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user