mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-22 03:51:53 +00:00
chore: remove unused console log
This commit is contained in:
@@ -49,7 +49,6 @@ export const ConnectAccountForm = () => {
|
||||
formValues.providerAlias = `${formValues.providerType}:${month}/${day}/${year}`;
|
||||
}
|
||||
|
||||
console.log({ formValues });
|
||||
const formData = new FormData();
|
||||
|
||||
Object.entries(formValues).forEach(
|
||||
|
||||
@@ -135,33 +135,28 @@ export const TestConnectionForm = ({
|
||||
|
||||
const onResetCredentials = async () => {
|
||||
setIsResettingCredentials(true);
|
||||
// Check if provider has no credentials
|
||||
|
||||
// Check if provider the provider has no credentials
|
||||
const providerSecretId =
|
||||
providerData?.data?.relationships?.secret?.data?.id;
|
||||
const hasNoCredentials = !providerSecretId;
|
||||
console.log({ providerSecretId }, "providerSecretId");
|
||||
console.log({ hasNoCredentials }, "hasNoCredentials");
|
||||
|
||||
if (hasNoCredentials) {
|
||||
// If no credentials, redirect to add credentials page
|
||||
console.log("no credentials");
|
||||
// router.push(
|
||||
// `/providers/add-credentials?type=${providerType}&id=${providerId}`,
|
||||
// );
|
||||
router.push(
|
||||
`/providers/add-credentials?type=${providerType}&id=${providerId}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// If has credentials, delete them first
|
||||
// If provider has credentials, delete them first
|
||||
try {
|
||||
// This function will need to be implemented
|
||||
await deleteCredentials(providerSecretId);
|
||||
// After successful deletion, redirect to add credentials page
|
||||
console.log("deleted credentials with success");
|
||||
router.push(
|
||||
`/providers/add-credentials?type=${providerType}&id=${providerId}`,
|
||||
);
|
||||
} catch (error) {
|
||||
// Handle error appropriately
|
||||
console.error("Failed to delete credentials:", error);
|
||||
} finally {
|
||||
setIsResettingCredentials(false);
|
||||
|
||||
Reference in New Issue
Block a user