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
commit 57ffecd0e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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