Skip to content

Commit

Permalink
chore: fix typo secret
Browse files Browse the repository at this point in the history
  • Loading branch information
edalex-yinzi committed Dec 4, 2024
1 parent 74fa84d commit 38730ae
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const commonApiDetails = (
onChange: (key: string, value: unknown) => void,
showValidationErrors: boolean,
apiDetails: ApiDetails,
isSecreteConfigured: boolean,
isSecretConfigured: boolean,
): Record<string, FieldRenderOptions> => {
const { platform, apiUrl, apiClientId } = apiDetails;
// apiClientSecret is not exist in OktaApiDetails.
Expand Down Expand Up @@ -353,17 +353,17 @@ const commonApiDetails = (
desc: apiClientSecretDesc,
required: true,
// Validation is not required for updating but required for the initial creation.
validate: isSecreteConfigured ? constTrue : isNonEmptyString,
validate: isSecretConfigured ? constTrue : isNonEmptyString,
component: passwordTextFiled({
name: apiClientSecretLabel,
value: apiClientSecret,
disabled: false,
required: true,
onChange: (value) => onChange("apiClientSecret", value),
showValidationErrors,
validate: isSecreteConfigured ? constTrue : isNonEmptyString,
validate: isSecretConfigured ? constTrue : isNonEmptyString,
errorMessage: missingValue,
placeholder: isSecreteConfigured ? passwordMask : undefined,
placeholder: isSecretConfigured ? passwordMask : undefined,
}),
},
};
Expand Down Expand Up @@ -393,21 +393,21 @@ export const generatePlatform = (
* @param apiDetails The value of the platform specific details.
* @param apiDetailsOnChange Function to be called when a platform specific field is changed.
* @param showValidationErrors Whether to show validation errors for each field.
* @param isSecreteConfigured Whether the server already has the API secrete.
* @param isSecretConfigured Whether the server already has the API secrete.
*/
export const generateApiDetails = (
apiDetails: ApiDetails,
apiDetailsOnChange: (key: string, value: unknown) => void,
showValidationErrors: boolean,
isSecreteConfigured: boolean,
isSecretConfigured: boolean,
): Record<string, FieldRenderOptions> => {
const platform = apiDetails.platform;

const apiCommonFields = commonApiDetails(
apiDetailsOnChange,
showValidationErrors,
apiDetails,
isSecreteConfigured,
isSecretConfigured,
);
const { apiUrl, apiClientId, apiClientSecret } = apiCommonFields;

Expand Down

0 comments on commit 38730ae

Please sign in to comment.