diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-05 10:58:44 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa (patch) | |
tree | c4984e854f5dc18e5c27afd73b843bd52c143034 /server/controllers/api/users/index.ts | |
parent | 07b1a18aa678d260009a93e36606c5c5f585723d (diff) | |
download | PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.gz PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.zst PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.zip |
Add playlist rest tests
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r-- | server/controllers/api/users/index.ts | 6 |
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' | |||
6 | import { CONFIG, RATES_LIMIT, sequelizeTypescript } from '../../../initializers' | 6 | import { CONFIG, RATES_LIMIT, sequelizeTypescript } from '../../../initializers' |
7 | import { Emailer } from '../../../lib/emailer' | 7 | import { Emailer } from '../../../lib/emailer' |
8 | import { Redis } from '../../../lib/redis' | 8 | import { Redis } from '../../../lib/redis' |
9 | import { createUserAccountAndChannel } from '../../../lib/user' | 9 | import { createUserAccountAndChannelAndPlaylist } from '../../../lib/user' |
10 | import { | 10 | import { |
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) |