From 47e0652b4a98916d4a1d012fbec61afd73a30565 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Nov 2017 18:40:50 +0100 Subject: Optimize account creation --- server/initializers/installer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 3f4c4dfbb..865495722 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts @@ -2,10 +2,9 @@ import * as passwordGenerator from 'password-generator' import { UserRole } from '../../shared' import { logger, mkdirpPromise, rimrafPromise } from '../helpers' import { createUserAccountAndChannel } from '../lib' -import { createLocalAccount } from '../lib/user' +import { createLocalAccountWithoutKeys } from '../lib/user' import { applicationExist, clientsExist, usersExist } from './checker' import { CACHE, CONFIG, LAST_MIGRATION_VERSION, SERVER_ACCOUNT_NAME } from './constants' - import { database as db } from './database' async function installApplication () { @@ -136,5 +135,6 @@ async function createApplicationIfNotExist () { const applicationInstance = await db.Application.create({ migrationVersion: LAST_MIGRATION_VERSION }) logger.info('Creating application account.') - return createLocalAccount(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) + + return createLocalAccountWithoutKeys(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) } -- cgit v1.2.3