This commit is contained in:
mahula 2023-06-13 12:04:45 +02:00
parent 1a9cef86ed
commit dfaa7e3aed
2 changed files with 10 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import { ArgsType, Field, Int } from 'type-graphql'
export class CreateUserArgs {
@Field(() => String, { nullable: true })
alias?: string | null
@Field(() => String)
email: string

View File

@ -207,7 +207,15 @@ export class UserResolver {
@Mutation(() => User)
async createUser(
@Args()
{ alias = null, email, firstName, lastName, language, publisherId = null, redeemCode = null }: CreateUserArgs,
{
alias = null,
email,
firstName,
lastName,
language,
publisherId = null,
redeemCode = null,
}: CreateUserArgs,
): Promise<User> {
logger.addContext('user', 'unknown')
logger.info(