Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: install process adjustment

shuaia5150d06a838
diff --git a/ui/src/pages/Install/index.tsx b/ui/src/pages/Install/index.tsx
index ae8f037b..b87b13b4 100644
--- a/ui/src/pages/Install/index.tsx
+++ b/ui/src/pages/Install/index.tsx
@@ -116,7 +116,7 @@ const Index: FC = () => {
setStep((pre) => pre + 1);
};
- const submitDatabaseForm = () => {
+ const checkInstall = () => {
const params = {
lang: formData.lang.value,
db_type: formData.db_type.value,
@@ -126,17 +126,16 @@ const Index: FC = () => {
db_name: formData.db_name.value,
db_file: formData.db_file.value,
};
- dbCheck(params)
+ installInit(params)
.then(() => {
handleNext();
})
.catch((err) => {
- console.log(err);
handleErr(err);
});
};
- const checkInstall = () => {
+ const submitDatabaseForm = () => {
const params = {
lang: formData.lang.value,
db_type: formData.db_type.value,
@@ -146,11 +145,13 @@ const Index: FC = () => {
db_name: formData.db_name.value,
db_file: formData.db_file.value,
};
- installInit(params)
+ dbCheck(params)
.then(() => {
- handleNext();
+ // handleNext();
+ checkInstall();
})
.catch((err) => {
+ console.log(err);
handleErr(err);
});
};
@@ -183,7 +184,11 @@ const Index: FC = () => {
submitDatabaseForm();
}
if (step === 3) {
- checkInstall();
+ if (errorData.msg) {
+ checkInstall();
+ } else {
+ handleNext();
+ }
}
if (step === 4) {
submitSiteConfig();