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)
This commit is contained in:
balibabu 2024-08-22 15:32:48 +08:00 committed by GitHub
parent e4765ebe0c
commit 20f3f54714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);