ActivityPub-federated video streaming platform using P2P directly in your web browser
Make channelName optionnal only for the API
kimsible69db1470432a
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.tsindex 869f31d848..5ae0dc7a73 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()))diff --git a/shared/models/users/user-create.model.ts b/shared/models/users/user-create.model.tsindex 601c531cd1..ddc71dd598 100644--- a/shared/models/users/user-create.model.ts+++ b/shared/models/users/user-create.model.ts@@ -9,5 +9,5 @@ export interface UserCreate {videoQuotaDaily: numberrole: UserRoleadminFlags?: UserAdminFlag- channelName: string+ channelName?: string}