Shun Miyazawa 2 лет назад
Родитель
Сommit
6695842f4b
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      apps/app/src/server/crowi/index.js

+ 3 - 3
apps/app/src/server/crowi/index.js

@@ -412,7 +412,7 @@ Crowi.prototype.setupMailer = async function() {
   }
 };
 
-Crowi.prototype.autoInstall = function() {
+Crowi.prototype.autoInstall = async function() {
   const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
   const username = this.configManager.getConfig('crowi', 'autoInstall:adminUsername');
 
@@ -436,7 +436,7 @@ Crowi.prototype.autoInstall = function() {
   const installerService = new InstallerService(this);
 
   try {
-    installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
+    await installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
       allowGuestMode,
       serverDate,
     });
@@ -483,7 +483,7 @@ Crowi.prototype.start = async function() {
   instantiateYjsConnectionManager(this.socketIoService.io);
   this.socketIoService.setupYjsConnection();
 
-  this.autoInstall();
+  await this.autoInstall();
 
   // listen
   const serverListening = httpServer.listen(this.port, () => {