X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fusers%2Fusers-command.ts;h=811b9685b42c4c3293a5dfcf5b6500cd3eb3dc8f;hb=9ab330b90decf4edf152ff8e1d2948c065766b2c;hp=d8303848d6c678789b8bd60b66f2309ffba295c9;hpb=bbd5aa7ead5f1554a0872963f957effc26d8c630;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/users/users-command.ts b/shared/server-commands/users/users-command.ts index d8303848d..811b9685b 100644 --- a/shared/server-commands/users/users-command.ts +++ b/shared/server-commands/users/users-command.ts @@ -202,7 +202,8 @@ export class UsersCommand extends AbstractCommand { token, userId: user.id, userChannelId: me.videoChannels[0].id, - userChannelName: me.videoChannels[0].name + userChannelName: me.videoChannels[0].name, + password } } @@ -217,12 +218,13 @@ export class UsersCommand extends AbstractCommand { username: string password?: string displayName?: string + email?: string channel?: { name: string displayName: string } }) { - const { username, password = 'password', displayName, channel } = options + const { username, password = 'password', displayName, channel, email = username + '@example.com' } = options const path = '/api/v1/users/register' return this.postBodyRequest({ @@ -232,7 +234,7 @@ export class UsersCommand extends AbstractCommand { fields: { username, password, - email: username + '@example.com', + email, displayName, channel },