chore: remove unused console log

This commit is contained in:
Pablo Lara
2024-11-06 14:06:14 +01:00
parent b11a33d3da
commit e90e10587b
2 changed files with 6 additions and 12 deletions
@@ -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);