perf: modal

This commit is contained in:
archer
2023-07-27 14:36:21 +08:00
parent 1c4d2e92cf
commit aebe789e9f
7 changed files with 40 additions and 21 deletions

View File

@@ -50,7 +50,7 @@ export async function connectToDatabase(): Promise<void> {
minPoolSize: 2
});
initRootUser();
await initRootUser();
initPg();
console.log('mongo connected');
} catch (error) {
@@ -84,7 +84,6 @@ async function initRootUser() {
});
} catch (error) {
console.log('init root user error', error);
initRootUser();
}
}
async function initPg() {
@@ -108,7 +107,6 @@ async function initPg() {
console.log('init pg successful');
} catch (error) {
console.log('init pg error', error);
initPg();
}
}