aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils')
-rw-r--r--shared/extra-utils/users/users.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts
index 0f2f0ae15..c09211b71 100644
--- a/shared/extra-utils/users/users.ts
+++ b/shared/extra-utils/users/users.ts
@@ -73,7 +73,7 @@ function registerUser (url: string, username: string, password: string, specialS
73 73
74function registerUserWithChannel (options: { 74function registerUserWithChannel (options: {
75 url: string, 75 url: string,
76 user: { username: string, password: string }, 76 user: { username: string, password: string, displayName?: string },
77 channel: { name: string, displayName: string } 77 channel: { name: string, displayName: string }
78}) { 78}) {
79 const path = '/api/v1/users/register' 79 const path = '/api/v1/users/register'
@@ -84,6 +84,10 @@ function registerUserWithChannel (options: {
84 channel: options.channel 84 channel: options.channel
85 } 85 }
86 86
87 if (options.user.displayName) {
88 Object.assign(body, { displayName: options.user.displayName })
89 }
90
87 return makePostBodyRequest({ 91 return makePostBodyRequest({
88 url: options.url, 92 url: options.url,
89 path, 93 path,