aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/initializers/installer.ts9
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'
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'
8import { database as db } from './database' 8import { database as db } from './database'
9import { createPrivateAndPublicKeys } from '../helpers/peertube-crypto'
9 10
10async function installApplication () { 11async 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}