aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r--server/controllers/api/users/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index 407f32ac0..5758c8227 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -6,7 +6,7 @@ import { getFormattedObjects } from '../../../helpers/utils'
6import { CONFIG, RATES_LIMIT, sequelizeTypescript } from '../../../initializers' 6import { CONFIG, RATES_LIMIT, sequelizeTypescript } from '../../../initializers'
7import { Emailer } from '../../../lib/emailer' 7import { Emailer } from '../../../lib/emailer'
8import { Redis } from '../../../lib/redis' 8import { Redis } from '../../../lib/redis'
9import { createUserAccountAndChannel } from '../../../lib/user' 9import { createUserAccountAndChannelAndPlaylist } from '../../../lib/user'
10import { 10import {
11 asyncMiddleware, 11 asyncMiddleware,
12 asyncRetryTransactionMiddleware, 12 asyncRetryTransactionMiddleware,
@@ -174,7 +174,7 @@ async function createUser (req: express.Request, res: express.Response) {
174 videoQuotaDaily: body.videoQuotaDaily 174 videoQuotaDaily: body.videoQuotaDaily
175 }) 175 })
176 176
177 const { user, account } = await createUserAccountAndChannel(userToCreate) 177 const { user, account } = await createUserAccountAndChannelAndPlaylist(userToCreate)
178 178
179 auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON())) 179 auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()))
180 logger.info('User %s with its channel and account created.', body.username) 180 logger.info('User %s with its channel and account created.', body.username)
@@ -205,7 +205,7 @@ async function registerUser (req: express.Request, res: express.Response) {
205 emailVerified: CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION ? false : null 205 emailVerified: CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION ? false : null
206 }) 206 })
207 207
208 const { user } = await createUserAccountAndChannel(userToCreate) 208 const { user } = await createUserAccountAndChannelAndPlaylist(userToCreate)
209 209
210 auditLogger.create(body.username, new UserAuditView(user.toFormattedJSON())) 210 auditLogger.create(body.username, new UserAuditView(user.toFormattedJSON()))
211 logger.info('User %s with its channel and account registered.', body.username) 211 logger.info('User %s with its channel and account registered.', body.username)