diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/users/users.ts | 6 | ||||
-rw-r--r-- | shared/models/users/user-register.model.ts | 2 |
2 files changed, 7 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 | ||
74 | function registerUserWithChannel (options: { | 74 | function 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, |
diff --git a/shared/models/users/user-register.model.ts b/shared/models/users/user-register.model.ts index ce5c9c3d2..cf9a43a67 100644 --- a/shared/models/users/user-register.model.ts +++ b/shared/models/users/user-register.model.ts | |||
@@ -3,6 +3,8 @@ export interface UserRegister { | |||
3 | password: string | 3 | password: string |
4 | email: string | 4 | email: string |
5 | 5 | ||
6 | displayName?: string | ||
7 | |||
6 | channel?: { | 8 | channel?: { |
7 | name: string | 9 | name: string |
8 | displayName: string | 10 | displayName: string |