await createOAuthClientIfNotExist()
await createOAuthAdminIfNotExist()
} catch (err) {
- logger.error('Cannot install application.', err)
- throw err
+ logger.error('Cannot install application.', { err })
+ process.exit(-1)
}
}
// Our password is weak so do not validate it
validatePassword = false
} else {
- password = passwordGenerator(8, true)
+ password = passwordGenerator(16, true)
}
const userData = {
email,
password,
role,
+ nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
videoQuota: -1
}
const user = new UserModel(userData)
// 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({