reimplement publisherId on updateUserInfos

This commit is contained in:
Ulf Gebhardt 2021-11-17 00:20:43 +01:00
parent 4fccc19b68
commit 540cbd0e1f
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,9 @@ export default class UpdateUserInfosArgs {
@Field({ nullable: true })
language?: string
@Field({ nullable: true })
publisherId?: number
@Field({ nullable: true })
password?: string

View File

@ -466,6 +466,7 @@ export class UserResolver {
description,
username,
language,
publisherId,
password,
passwordNew,
coinanimation,
@ -526,6 +527,11 @@ export class UserResolver {
loginUser.privKey = encryptedPrivkey
}
// Save publisherId only if Elopage is not yet registered
if (publisherId && !(await this.hasElopage(context))) {
loginUser.publisherId = publisherId
}
const queryRunner = getConnection().createQueryRunner()
await queryRunner.connect()
await queryRunner.startTransaction('READ UNCOMMITTED')