aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-05 10:58:44 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commitdf0b219d36bf6852cdf2a7ad09ed4a41c6bccefa (patch)
treec4984e854f5dc18e5c27afd73b843bd52c143034 /server/controllers/api/users
parent07b1a18aa678d260009a93e36606c5c5f585723d (diff)
downloadPeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.gz
PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.zst
PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.zip
Add playlist rest tests
Diffstat (limited to 'server/controllers/api/users')
-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)