mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix seed
This commit is contained in:
parent
c0156d4a29
commit
e255896fdc
@ -12,17 +12,13 @@ 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.username = context.username ? context.username : faker.internet.userName()
|
||||
user.disabled = context.disabled ? context.disabled : false
|
||||
user.indexId = 0
|
||||
user.description = context.description ? context.description : faker.random.words(4)
|
||||
// TODO Create real password and keys/hash
|
||||
user.password = context.password ? context.password : BigInt(0)
|
||||
user.privKey = context.privKey ? context.privKey : randomBytes(80)
|
||||
user.emailHash = context.emailHash ? context.emailHash : randomBytes(32)
|
||||
user.createdAt = context.createdAt ? context.createdAt : faker.date.recent()
|
||||
user.emailChecked = context.emailChecked === undefined ? false : context.emailChecked
|
||||
user.passphraseShown = context.passphraseShown ? context.passphraseShown : false
|
||||
user.language = context.language ? context.language : 'en'
|
||||
user.publisherId = context.publisherId ? context.publisherId : 0
|
||||
user.passphrase = context.passphrase ? context.passphrase : faker.random.words(24)
|
||||
|
||||
@ -3,15 +3,12 @@ export interface UserContext {
|
||||
email?: string
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
username?: string
|
||||
disabled?: boolean
|
||||
description?: string
|
||||
password?: BigInt
|
||||
privKey?: Buffer
|
||||
emailHash?: Buffer
|
||||
createdAt?: Date
|
||||
emailChecked?: boolean
|
||||
passphraseShown?: boolean
|
||||
language?: string
|
||||
publisherId?: number
|
||||
passphrase?: string
|
||||
|
||||
@ -3,15 +3,12 @@ export interface UserInterface {
|
||||
email?: string
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
username?: string
|
||||
description?: string
|
||||
password?: BigInt
|
||||
pubKey?: Buffer
|
||||
privKey?: Buffer
|
||||
emailHash?: Buffer
|
||||
createdAt?: Date
|
||||
emailChecked?: boolean
|
||||
passphraseShown?: boolean
|
||||
language?: string
|
||||
disabled?: boolean
|
||||
groupId?: number
|
||||
|
||||
@ -42,15 +42,12 @@ const createUserContext = (context: UserInterface): UserContext => {
|
||||
email: context.email,
|
||||
firstName: context.firstName,
|
||||
lastName: context.lastName,
|
||||
username: context.username,
|
||||
disabled: context.disabled,
|
||||
description: context.description,
|
||||
password: context.password,
|
||||
privKey: context.privKey,
|
||||
emailHash: context.emailHash,
|
||||
createdAt: context.createdAt,
|
||||
emailChecked: context.emailChecked,
|
||||
passphraseShown: context.passphraseShown,
|
||||
language: context.language,
|
||||
publisherId: context.publisherId,
|
||||
}
|
||||
@ -59,7 +56,6 @@ const createUserContext = (context: UserInterface): UserContext => {
|
||||
const createServerUserContext = (context: UserInterface): ServerUserContext => {
|
||||
return {
|
||||
role: context.role,
|
||||
username: context.username,
|
||||
password: context.serverUserPassword,
|
||||
email: context.email,
|
||||
activated: context.activated,
|
||||
|
||||
@ -3,7 +3,7 @@ export const bibiBloxberg = {
|
||||
firstName: 'Bibi',
|
||||
lastName: 'Bloxberg',
|
||||
username: 'bibi',
|
||||
description: 'Hex Hex',
|
||||
// description: 'Hex Hex',
|
||||
password: BigInt('12825419584724616625'),
|
||||
pubKey: Buffer.from('42de7e4754625b730018c3b4ea745a4d043d9d867af352d0f08871793dfa6743', 'hex'),
|
||||
privKey: Buffer.from(
|
||||
@ -13,7 +13,6 @@ export const bibiBloxberg = {
|
||||
emailHash: Buffer.from('38a0d8c8658a5681cc1180c5d9e2b2a18e4f611db8ab3ca61de4aa91ae94219b', 'hex'),
|
||||
createdAt: new Date('2021-11-26T11:32:16'),
|
||||
emailChecked: true,
|
||||
passphraseShown: false,
|
||||
language: 'de',
|
||||
disabled: false,
|
||||
groupId: 1,
|
||||
|
||||
@ -3,7 +3,7 @@ export const bobBaumeister = {
|
||||
firstName: 'Bob',
|
||||
lastName: 'der Baumeister',
|
||||
username: 'bob',
|
||||
description: 'Können wir das schaffen? Ja, wir schaffen das!',
|
||||
// description: 'Können wir das schaffen? Ja, wir schaffen das!',
|
||||
password: BigInt('3296644341468822636'),
|
||||
pubKey: Buffer.from('a509d9a146374fc975e3677db801ae8a4a83bff9dea96da64053ff6de6b2dd7e', 'hex'),
|
||||
privKey: Buffer.from(
|
||||
@ -13,7 +13,6 @@ export const bobBaumeister = {
|
||||
emailHash: Buffer.from('4b8ce4e175587aaf33da19e272719da1a547daff557820191fab0c65c5a3b7f1', 'hex'),
|
||||
createdAt: new Date('2021-11-26T11:36:31'),
|
||||
emailChecked: true,
|
||||
passphraseShown: false,
|
||||
language: 'de',
|
||||
disabled: false,
|
||||
groupId: 1,
|
||||
|
||||
@ -3,13 +3,12 @@ export const garrickOllivander = {
|
||||
firstName: 'Garrick',
|
||||
lastName: 'Ollivander',
|
||||
username: 'garrick',
|
||||
description: `Curious ... curious ...
|
||||
Renowned wandmaker Mr Ollivander owns the wand shop Ollivanders: Makers of Fine Wands Since 382 BC in Diagon Alley. His shop is widely considered the best place to purchase a wand.`,
|
||||
// description: `Curious ... curious ...
|
||||
// Renowned wandmaker Mr Ollivander owns the wand shop Ollivanders: Makers of Fine Wands Since 382 BC in Diagon Alley. His shop is widely considered the best place to purchase a wand.`,
|
||||
password: BigInt('0'),
|
||||
emailHash: Buffer.from('91e358000e908146342789979d62a7255b2b88a71dad0c6a10e32af44be57886', 'hex'),
|
||||
createdAt: new Date('2022-01-10T10:23:17'),
|
||||
emailChecked: false,
|
||||
passphraseShown: false,
|
||||
language: 'en',
|
||||
disabled: false,
|
||||
groupId: 1,
|
||||
|
||||
@ -3,7 +3,7 @@ export const peterLustig = {
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
username: 'peter',
|
||||
description: 'Latzhose und Nickelbrille',
|
||||
// description: 'Latzhose und Nickelbrille',
|
||||
password: BigInt('3917921995996627700'),
|
||||
pubKey: Buffer.from('7281e0ee3258b08801f3ec73e431b4519677f65c03b0382c63a913b5784ee770', 'hex'),
|
||||
privKey: Buffer.from(
|
||||
@ -13,7 +13,6 @@ export const peterLustig = {
|
||||
emailHash: Buffer.from('9f700e6f6ec351a140b674c0edd4479509697b023bd8bee8826915ef6c2af036', 'hex'),
|
||||
createdAt: new Date('2020-11-25T10:48:43'),
|
||||
emailChecked: true,
|
||||
passphraseShown: false,
|
||||
language: 'de',
|
||||
disabled: false,
|
||||
groupId: 1,
|
||||
|
||||
@ -3,7 +3,7 @@ export const raeuberHotzenplotz = {
|
||||
firstName: 'Räuber',
|
||||
lastName: 'Hotzenplotz',
|
||||
username: 'räuber',
|
||||
description: 'Pfefferpistole',
|
||||
// description: 'Pfefferpistole',
|
||||
password: BigInt('12123692783243004812'),
|
||||
pubKey: Buffer.from('d7c70f94234dff071d982aa8f41583876c356599773b5911b39080da2b8c2d2b', 'hex'),
|
||||
privKey: Buffer.from(
|
||||
@ -13,7 +13,6 @@ export const raeuberHotzenplotz = {
|
||||
emailHash: Buffer.from('ec8d34112adb40ff2f6538b05660b03440372690f034cd7d6322d17020233c77', 'hex'),
|
||||
createdAt: new Date('2021-11-26T11:32:16'),
|
||||
emailChecked: true,
|
||||
passphraseShown: false,
|
||||
language: 'de',
|
||||
disabled: false,
|
||||
groupId: 1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user