MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / handleEditFormConfirm

Function handleEditFormConfirm

frontend/src/components/plugins/index.tsx:356–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354 setOpenEditFormDrawer(false)
355 }
356 const handleEditFormConfirm = async () => {
357
358 form.validateFields().then(async () => {
359 try {
360 const credentials = form.getFieldsValue()
361 const params = {
362 name: bundleName,
363 credentials,
364 }
365 setConfirmLoading(true)
366 await editPlugin(bundleId, params)
367 const limit1: number = limit || 20
368 dispatch(fetchPluginData(limit1) as any);
369 setUpdatePrevButton(true)
370 setOpenEditFormDrawer(false)
371 setOpenEditDrawer(false)
372 toast.success(t('updateSuccessful'))
373 } catch (error) {
374 const apiError = error as ApiErrorResponse;
375 const errorMessage: string = apiError.response.data.error.message;
376 toast.error(errorMessage)
377 } finally {
378 setConfirmLoading(false)
379
380 }
381
382 })
383 }
384 return (
385 <div className={styles["actions"]}>
386 <Spin spinning={loading} wrapperClassName={styles.spinloading}>

Callers

nothing calls this directly

Calls 2

editPluginFunction · 0.90
fetchPluginDataFunction · 0.90

Tested by

no test coverage detected