Skip to content

Commit

Permalink
Fixing logic for connectors with optional secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed May 5, 2021
1 parent 6d3d7ee commit 3be3824
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function transformConnectorForExport(
// If connector requires secrets, this will throw an error
validateSecrets(actionType, {});

// If connector has optional secrets, set isMissingSecrets value to value of hasAuth
// If connector doesn't have hasAuth value, default to isMissingSecrets: true
isMissingSecrets = (connector?.attributes?.config?.hasAuth as boolean) ?? true;
// If connector has optional (or no) secrets, set isMissingSecrets value to value of hasAuth
// If connector doesn't have hasAuth value, default to isMissingSecrets: false
isMissingSecrets = (connector?.attributes?.config?.hasAuth as boolean) ?? false;
} catch (err) {
isMissingSecrets = true;
}
Expand Down

0 comments on commit 3be3824

Please sign in to comment.