mirror of
https://github.com/langgenius/dify.git
synced 2025-11-14 02:12:34 +00:00
11 lines
348 B
TypeScript
11 lines
348 B
TypeScript
|
|
export const transformFormSchemasSecretInput = (isPristineSecretInputNames: string[], values: Record<string, any>) => {
|
||
|
|
const transformedValues: Record<string, any> = { ...values }
|
||
|
|
|
||
|
|
isPristineSecretInputNames.forEach((name) => {
|
||
|
|
if (transformedValues[name])
|
||
|
|
transformedValues[name] = '[__HIDDEN__]'
|
||
|
|
})
|
||
|
|
|
||
|
|
return transformedValues
|
||
|
|
}
|