mirror of
https://github.com/langgenius/dify.git
synced 2026-12-03 11:08:02 +08:00
10 lines
348 B
TypeScript
10 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
|
||
|
|
}
|