diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-16 18:40:50 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 47e0652b4a98916d4a1d012fbec61afd73a30565 (patch) | |
tree | 8d400cce95b50d18921b30fea1d5d2d89b5da740 /server/initializers/installer.ts | |
parent | 41dbdb8acff3ac56187e8149eab0ff82e2377597 (diff) | |
download | PeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.tar.gz PeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.tar.zst PeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.zip |
Optimize account creation
Diffstat (limited to 'server/initializers/installer.ts')
-rw-r--r-- | server/initializers/installer.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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' | |||
2 | import { UserRole } from '../../shared' | 2 | import { UserRole } from '../../shared' |
3 | import { logger, mkdirpPromise, rimrafPromise } from '../helpers' | 3 | import { logger, mkdirpPromise, rimrafPromise } from '../helpers' |
4 | import { createUserAccountAndChannel } from '../lib' | 4 | import { createUserAccountAndChannel } from '../lib' |
5 | import { createLocalAccount } from '../lib/user' | 5 | import { createLocalAccountWithoutKeys } from '../lib/user' |
6 | import { applicationExist, clientsExist, usersExist } from './checker' | 6 | import { applicationExist, clientsExist, usersExist } from './checker' |
7 | import { CACHE, CONFIG, LAST_MIGRATION_VERSION, SERVER_ACCOUNT_NAME } from './constants' | 7 | import { CACHE, CONFIG, LAST_MIGRATION_VERSION, SERVER_ACCOUNT_NAME } from './constants' |
8 | |||
9 | import { database as db } from './database' | 8 | import { database as db } from './database' |
10 | 9 | ||
11 | async function installApplication () { | 10 | async function installApplication () { |
@@ -136,5 +135,6 @@ async function createApplicationIfNotExist () { | |||
136 | const applicationInstance = await db.Application.create({ migrationVersion: LAST_MIGRATION_VERSION }) | 135 | const applicationInstance = await db.Application.create({ migrationVersion: LAST_MIGRATION_VERSION }) |
137 | 136 | ||
138 | logger.info('Creating application account.') | 137 | logger.info('Creating application account.') |
139 | return createLocalAccount(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) | 138 | |
139 | return createLocalAccountWithoutKeys(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) | ||
140 | } | 140 | } |