mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
deleted used factory
This commit is contained in:
parent
d7f06dad12
commit
d61b26ac65
@ -1,18 +0,0 @@
|
||||
import Faker from 'faker'
|
||||
import { define } from 'typeorm-seeding'
|
||||
import { LoginUserBackup } from '../../entity/LoginUserBackup'
|
||||
import { LoginUserBackupContext } from '../interface/UserContext'
|
||||
|
||||
define(LoginUserBackup, (faker: typeof Faker, context?: LoginUserBackupContext) => {
|
||||
if (!context || !context.userId) {
|
||||
throw new Error('LoginUserBackup: No userId present!')
|
||||
}
|
||||
|
||||
const userBackup = new LoginUserBackup()
|
||||
// TODO: Get the real passphrase
|
||||
userBackup.passphrase = context.passphrase ? context.passphrase : faker.random.words(24)
|
||||
userBackup.mnemonicType = context.mnemonicType ? context.mnemonicType : 2
|
||||
userBackup.userId = context.userId
|
||||
|
||||
return userBackup
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user