mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge remote-tracking branch 'origin/bugfix-saveUserEntity-getCustomRepository' into apollo_createTransactions_without_signation
This commit is contained in:
commit
0990799d74
@ -64,7 +64,7 @@ export class UserResolver {
|
|||||||
userEntity.email = user.email
|
userEntity.email = user.email
|
||||||
userEntity.pubkey = Buffer.from(fromHex(user.pubkey))
|
userEntity.pubkey = Buffer.from(fromHex(user.pubkey))
|
||||||
|
|
||||||
userEntity.save().catch(() => {
|
userRepository.save(userEntity).catch(() => {
|
||||||
throw new Error('error by save userEntity')
|
throw new Error('error by save userEntity')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -144,7 +144,8 @@ export class UserResolver {
|
|||||||
dbuser.lastName = user.lastName
|
dbuser.lastName = user.lastName
|
||||||
dbuser.username = user.username
|
dbuser.username = user.username
|
||||||
|
|
||||||
dbuser.save().catch(() => {
|
const userRepository = getCustomRepository(UserRepository)
|
||||||
|
userRepository.save(dbuser).catch(() => {
|
||||||
throw new Error('error saving user')
|
throw new Error('error saving user')
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -246,7 +247,7 @@ export class UserResolver {
|
|||||||
userEntityChanged = true
|
userEntityChanged = true
|
||||||
}
|
}
|
||||||
if (userEntityChanged) {
|
if (userEntityChanged) {
|
||||||
userEntity.save().catch((error) => {
|
userRepository.save(userEntity).catch((error) => {
|
||||||
throw new Error(error)
|
throw new Error(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user