aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/users/users-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/users/users-command.ts')
-rw-r--r--shared/server-commands/users/users-command.ts8
1 files changed, 5 insertions, 3 deletions
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 {
202 token, 202 token,
203 userId: user.id, 203 userId: user.id,
204 userChannelId: me.videoChannels[0].id, 204 userChannelId: me.videoChannels[0].id,
205 userChannelName: me.videoChannels[0].name 205 userChannelName: me.videoChannels[0].name,
206 password
206 } 207 }
207 } 208 }
208 209
@@ -217,12 +218,13 @@ export class UsersCommand extends AbstractCommand {
217 username: string 218 username: string
218 password?: string 219 password?: string
219 displayName?: string 220 displayName?: string
221 email?: string
220 channel?: { 222 channel?: {
221 name: string 223 name: string
222 displayName: string 224 displayName: string
223 } 225 }
224 }) { 226 }) {
225 const { username, password = 'password', displayName, channel } = options 227 const { username, password = 'password', displayName, channel, email = username + '@example.com' } = options
226 const path = '/api/v1/users/register' 228 const path = '/api/v1/users/register'
227 229
228 return this.postBodyRequest({ 230 return this.postBodyRequest({
@@ -232,7 +234,7 @@ export class UsersCommand extends AbstractCommand {
232 fields: { 234 fields: {
233 username, 235 username,
234 password, 236 password,
235 email: username + '@example.com', 237 email,
236 displayName, 238 displayName,
237 channel 239 channel
238 }, 240 },