Make channelName optionnal only for the API
This commit is contained in:
parent
4e68fc8605
commit
69db147043
2 changed files with 2 additions and 2 deletions
|
@ -197,7 +197,7 @@ async function createUser (req: express.Request, res: express.Response) {
|
||||||
|
|
||||||
const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({
|
const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({
|
||||||
userToCreate,
|
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()))
|
auditLogger.create(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()))
|
||||||
|
|
|
@ -9,5 +9,5 @@ export interface UserCreate {
|
||||||
videoQuotaDaily: number
|
videoQuotaDaily: number
|
||||||
role: UserRole
|
role: UserRole
|
||||||
adminFlags?: UserAdminFlag
|
adminFlags?: UserAdminFlag
|
||||||
channelName: string
|
channelName?: string
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue