mirror of https://github.com/langgenius/dify.git
fix: api key params
This commit is contained in:
parent
eae65e55ce
commit
63d26f0478
|
|
@ -160,23 +160,23 @@ export const CommonCreateModal = ({ onClose, createType }: Props) => {
|
|||
if (!subscriptionBuilder)
|
||||
return
|
||||
|
||||
const formValues = propertiesFormRef.current?.getFormValues({}) || { values: {}, isCheckValidated: false }
|
||||
if (!formValues.isCheckValidated) {
|
||||
Toast.notify({
|
||||
type: 'error',
|
||||
message: t('pluginTrigger.modal.form.properties.required'),
|
||||
})
|
||||
return
|
||||
}
|
||||
const parameterForm = parametersFormRef.current?.getFormValues({}) || { values: {}, isCheckValidated: false }
|
||||
// console.log('formValues', formValues)
|
||||
// if (!formValues.isCheckValidated) {
|
||||
// Toast.notify({
|
||||
// type: 'error',
|
||||
// message: t('pluginTrigger.modal.form.properties.required'),
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
buildSubscription(
|
||||
{
|
||||
provider: providerName,
|
||||
subscriptionBuilderId: subscriptionBuilder.id,
|
||||
params: {
|
||||
name: subscriptionName,
|
||||
properties: formValues.values,
|
||||
},
|
||||
name: subscriptionName,
|
||||
parameters: { ...parameterForm.values, events: ['*'] },
|
||||
// properties: formValues.values,
|
||||
},
|
||||
{
|
||||
onSuccess: () => {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ export const useBuildTriggerSubscription = () => {
|
|||
mutationFn: (payload: {
|
||||
provider: string
|
||||
subscriptionBuilderId: string
|
||||
params?: Record<string, any>
|
||||
[key: string]: any
|
||||
}) => {
|
||||
const { provider, subscriptionBuilderId, ...body } = payload
|
||||
return post(
|
||||
|
|
|
|||
Loading…
Reference in New Issue