diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/installer.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 865495722..954516057 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -6,6 +6,7 @@ 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 | import { database as db } from './database' | 8 | import { database as db } from './database' |
9 | import { createPrivateAndPublicKeys } from '../helpers/peertube-crypto' | ||
9 | 10 | ||
10 | async function installApplication () { | 11 | async function installApplication () { |
11 | try { | 12 | try { |
@@ -136,5 +137,11 @@ async function createApplicationIfNotExist () { | |||
136 | 137 | ||
137 | logger.info('Creating application account.') | 138 | logger.info('Creating application account.') |
138 | 139 | ||
139 | return createLocalAccountWithoutKeys(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) | 140 | const accountCreated = await createLocalAccountWithoutKeys(SERVER_ACCOUNT_NAME, null, applicationInstance.id, undefined) |
141 | |||
142 | const { publicKey, privateKey } = await createPrivateAndPublicKeys() | ||
143 | accountCreated.set('publicKey', publicKey) | ||
144 | accountCreated.set('privateKey', privateKey) | ||
145 | |||
146 | return accountCreated.save() | ||
140 | } | 147 | } |