From 20f3f547141d1f294811b3565a6fe70281f6be83 Mon Sep 17 00:00:00 2001 From: balibabu Date: Thu, 22 Aug 2024 15:32:48 +0800 Subject: [PATCH] feat: Fixed the issue where the test database connection was successful but the prompt message showed that there was no error status #1739 (#2051) ### What problem does this PR solve? feat: Fixed the issue where the test database connection was successful but the prompt message showed that there was no error status #1739 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/hooks/flow-hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/hooks/flow-hooks.ts b/web/src/hooks/flow-hooks.ts index 19fe55888..ec1d950b9 100644 --- a/web/src/hooks/flow-hooks.ts +++ b/web/src/hooks/flow-hooks.ts @@ -201,7 +201,7 @@ export const useTestDbConnect = () => { mutationKey: ['testDbConnect'], mutationFn: async (params: any) => { const ret = await flowService.testDbConnect(params); - if (ret?.retcode === 0) { + if (ret?.data?.retcode === 0) { message.success(ret?.data?.data); } else { message.error(ret?.data?.data);