]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/installer.ts
Add french
[github/Chocobozzz/PeerTube.git] / server / initializers / installer.ts
index 324a2c2e5bdd4eefa0fca36f6627c2804db696bf..b0084b368de84e26893c82a143e9d1315e724df1 100644 (file)
@@ -19,7 +19,7 @@ async function installApplication () {
     await createOAuthClientIfNotExist()
     await createOAuthAdminIfNotExist()
   } catch (err) {
-    logger.error('Cannot install application.', err)
+    logger.error('Cannot install application.', { err })
     process.exit(-1)
   }
 }
@@ -112,7 +112,7 @@ async function createOAuthAdminIfNotExist () {
     // Our password is weak so do not validate it
     validatePassword = false
   } else {
-    password = passwordGenerator(8, true)
+    password = passwordGenerator(16, true)
   }
 
   const userData = {
@@ -120,6 +120,7 @@ async function createOAuthAdminIfNotExist () {
     email,
     password,
     role,
+    nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
     videoQuota: -1
   }
   const user = new UserModel(userData)
@@ -134,8 +135,6 @@ async function createApplicationIfNotExist () {
   // Nothing to do, application already exist
   if (exist === true) return undefined
 
-  logger.info('Creating Application table.')
-
   logger.info('Creating application account.')
 
   const application = await ApplicationModel.create({