From 69db1470432a6db8ef6929ef3175af75f7aaa963 Mon Sep 17 00:00:00 2001 From: kimsible Date: Wed, 29 Jul 2020 18:35:17 +0200 Subject: Make channelName optionnal only for the API --- server/controllers/api/users/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/controllers/api') 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) { const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({ userToCreate, - channelNames: { name: body.channelName, displayName: body.channelName } + channelNames: body.channelName && { name: body.channelName, displayName: body.channelName } }) auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON())) -- cgit v1.2.3