MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / onFinish

Function onFinish

web/packages/tca-layout/src/modules/tools/create-tool.tsx:33–48  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

31
32 /** 创建工具 */
33 const onFinish = (data: any) => {
34 const newFormData = data;
35 const [authType, id] = data?.scm_auth_id?.split('#') ?? [];
36 delete newFormData.scm_auth_id;
37
38 newFormData.scm_auth = { auth_type: authType };
39
40 if (SCM_MAP[authType as AuthTypeEnum]) {
41 newFormData.scm_auth[SCM_MAP[authType as AuthTypeEnum]] = id;
42 }
43
44 createTool(orgId, newFormData).then(({ id }: any) => {
45 message.success(t('创建成功'));
46 history.push(`${getToolsRouter(orgId)}/${id}/rules`);
47 });
48 };
49
50 return (
51 <Dialog

Callers

nothing calls this directly

Calls 2

createToolFunction · 0.90
getToolsRouterFunction · 0.90

Tested by

no test coverage detected