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.email = context.email ? context.email : faker.internet.email()
|
||||||
user.firstName = context.firstName ? context.firstName : faker.name.firstName()
|
user.firstName = context.firstName ? context.firstName : faker.name.firstName()
|
||||||
user.lastName = context.lastName ? context.lastName : faker.name.lastName()
|
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
|
// TODO Create real password and keys/hash
|
||||||
user.password = context.password ? context.password : BigInt(0)
|
user.password = context.password ? context.password : BigInt(0)
|
||||||
user.privKey = context.privKey ? context.privKey : randomBytes(80)
|
user.privKey = context.privKey ? context.privKey : randomBytes(80)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ export interface UserContext {
|
|||||||
email?: string
|
email?: string
|
||||||
firstName?: string
|
firstName?: string
|
||||||
lastName?: string
|
lastName?: string
|
||||||
disabled?: boolean
|
deletedAt?: Date
|
||||||
password?: BigInt
|
password?: BigInt
|
||||||
privKey?: Buffer
|
privKey?: Buffer
|
||||||
emailHash?: Buffer
|
emailHash?: Buffer
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export interface UserInterface {
|
|||||||
createdAt?: Date
|
createdAt?: Date
|
||||||
emailChecked?: boolean
|
emailChecked?: boolean
|
||||||
language?: string
|
language?: string
|
||||||
disabled?: boolean
|
deletedAt?: Date
|
||||||
groupId?: number
|
groupId?: number
|
||||||
publisherId?: number
|
publisherId?: number
|
||||||
passphrase?: string
|
passphrase?: string
|
||||||
|
|||||||
@ -42,7 +42,7 @@ const createUserContext = (context: UserInterface): UserContext => {
|
|||||||
email: context.email,
|
email: context.email,
|
||||||
firstName: context.firstName,
|
firstName: context.firstName,
|
||||||
lastName: context.lastName,
|
lastName: context.lastName,
|
||||||
disabled: context.disabled,
|
deletedAt: context.deletedAt,
|
||||||
password: context.password,
|
password: context.password,
|
||||||
privKey: context.privKey,
|
privKey: context.privKey,
|
||||||
emailHash: context.emailHash,
|
emailHash: context.emailHash,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user