mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fixed factories
This commit is contained in:
parent
bc43c495ad
commit
d76798e02f
@ -12,7 +12,7 @@ define(User, (faker: typeof Faker, context?: UserContext) => {
|
||||
user.email = context.email ? context.email : faker.internet.email()
|
||||
user.firstName = context.firstName ? context.firstName : faker.name.firstName()
|
||||
user.lastName = context.lastName ? context.lastName : faker.name.lastName()
|
||||
user.disabled = context.disabled ? context.disabled : false
|
||||
user.deletedAt = context.deletedAt ? context.deletedAt : null
|
||||
// TODO Create real password and keys/hash
|
||||
user.password = context.password ? context.password : BigInt(0)
|
||||
user.privKey = context.privKey ? context.privKey : randomBytes(80)
|
||||
|
||||
@ -3,7 +3,7 @@ export interface UserContext {
|
||||
email?: string
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
disabled?: boolean
|
||||
deletedAt?: Date
|
||||
password?: BigInt
|
||||
privKey?: Buffer
|
||||
emailHash?: Buffer
|
||||
|
||||
@ -10,7 +10,7 @@ export interface UserInterface {
|
||||
createdAt?: Date
|
||||
emailChecked?: boolean
|
||||
language?: string
|
||||
disabled?: boolean
|
||||
deletedAt?: Date
|
||||
groupId?: number
|
||||
publisherId?: number
|
||||
passphrase?: string
|
||||
|
||||
@ -42,7 +42,7 @@ const createUserContext = (context: UserInterface): UserContext => {
|
||||
email: context.email,
|
||||
firstName: context.firstName,
|
||||
lastName: context.lastName,
|
||||
disabled: context.disabled,
|
||||
deletedAt: context.deletedAt,
|
||||
password: context.password,
|
||||
privKey: context.privKey,
|
||||
emailHash: context.emailHash,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user