aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/controllers/api/users/index.ts2
-rw-r--r--shared/models/users/user-create.model.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index 869f31d84..5ae0dc7a7 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -197,7 +197,7 @@ async function createUser (req: express.Request, res: express.Response) {
197 197
198 const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({ 198 const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({
199 userToCreate, 199 userToCreate,
200 channelNames: { name: body.channelName, displayName: body.channelName } 200 channelNames: body.channelName && { name: body.channelName, displayName: body.channelName }
201 }) 201 })
202 202
203 auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON())) 203 auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()))
diff --git a/shared/models/users/user-create.model.ts b/shared/models/users/user-create.model.ts
index 601c531cd..ddc71dd59 100644
--- a/shared/models/users/user-create.model.ts
+++ b/shared/models/users/user-create.model.ts
@@ -9,5 +9,5 @@ export interface UserCreate {
9 videoQuotaDaily: number 9 videoQuotaDaily: number
10 role: UserRole 10 role: UserRole
11 adminFlags?: UserAdminFlag 11 adminFlags?: UserAdminFlag
12 channelName: string 12 channelName?: string
13} 13}