fix: remove unnecessary credentials of custom tool (#2621)
This commit is contained in:
parent
801d135390
commit
57ffecd0e5
2 changed files with 15 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue