fix: remove unnecessary credentials of custom tool (#2621)

This commit is contained in:
Yeuoly
2024-02-29 12:58:12 +08:00
committed by GitHub
parent 801d135390
commit 57ffecd0e5
2 changed files with 15 additions and 1 deletions

View File

@@ -118,6 +118,13 @@ const EditCustomCollectionModal: FC<Props> = ({
const handleSave = () => {
const postData = clone(customCollection)
delete postData.tools
if (postData.credentials.auth_type === AuthType.none) {
delete postData.credentials.api_key_header
delete postData.credentials.api_key_header_prefix
delete postData.credentials.api_key_value
}
if (isAdd) {
onAdd?.(postData)
return