mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add hideAmount to updataUserInfos args & change updateUserInfo method.
Co-authored-by: ogerly <fridolin@tutanota.com>
This commit is contained in:
parent
643de6144a
commit
465dc469b0
@ -19,4 +19,10 @@ export default class UpdateUserInfosArgs {
|
||||
|
||||
@Field({ nullable: true })
|
||||
passwordNew?: string
|
||||
|
||||
@Field({ nullable: false })
|
||||
hideAmountGDD: boolean
|
||||
|
||||
@Field({ nullable: false })
|
||||
hideAmountGDT: boolean
|
||||
}
|
||||
|
||||
@ -567,7 +567,15 @@ export class UserResolver {
|
||||
@Mutation(() => Boolean)
|
||||
async updateUserInfos(
|
||||
@Args()
|
||||
{ firstName, lastName, language, password, passwordNew }: UpdateUserInfosArgs,
|
||||
{
|
||||
firstName,
|
||||
lastName,
|
||||
language,
|
||||
password,
|
||||
passwordNew,
|
||||
hideAmountGDD,
|
||||
hideAmountGDT,
|
||||
}: UpdateUserInfosArgs,
|
||||
@Ctx() context: Context,
|
||||
): Promise<boolean> {
|
||||
logger.info(`updateUserInfos(${firstName}, ${lastName}, ${language}, ***, ***)...`)
|
||||
@ -609,6 +617,10 @@ export class UserResolver {
|
||||
userEntity.password = encryptPassword(userEntity, passwordNew)
|
||||
}
|
||||
|
||||
// Save hideAmountGDD value
|
||||
userEntity.hideAmountGDD = hideAmountGDD
|
||||
userEntity.hideAmountGDT = hideAmountGDT
|
||||
|
||||
const queryRunner = getConnection().createQueryRunner()
|
||||
await queryRunner.connect()
|
||||
await queryRunner.startTransaction('REPEATABLE READ')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user