aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-16 18:40:50 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit47e0652b4a98916d4a1d012fbec61afd73a30565 (patch)
tree8d400cce95b50d18921b30fea1d5d2d89b5da740 /server/initializers
parent41dbdb8acff3ac56187e8149eab0ff82e2377597 (diff)
downloadPeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.tar.gz
PeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.tar.zst
PeerTube-47e0652b4a98916d4a1d012fbec61afd73a30565.zip
Optimize account creation
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/installer.ts6
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'
2import { UserRole } from '../../shared' 2import { UserRole } from '../../shared'
3import { logger, mkdirpPromise, rimrafPromise } from '../helpers' 3import { logger, mkdirpPromise, rimrafPromise } from '../helpers'
4import { createUserAccountAndChannel } from '../lib' 4import { createUserAccountAndChannel } from '../lib'
5import { createLocalAccount } from '../lib/user' 5import { createLocalAccountWithoutKeys } from '../lib/user'
6import { applicationExist, clientsExist, usersExist } from './checker' 6import { applicationExist, clientsExist, usersExist } from './checker'
7import { CACHE, CONFIG, LAST_MIGRATION_VERSION, SERVER_ACCOUNT_NAME } from './constants' 7import { CACHE, CONFIG, LAST_MIGRATION_VERSION, SERVER_ACCOUNT_NAME } from './constants'
8
9import { database as db } from './database' 8import { database as db } from './database'
10 9
11async function installApplication () { 10async 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}