Their was an error in the UserResolver due to a check undefined and false would fall out of the update change it to !== undefined.

This commit is contained in:
elweyn 2021-11-18 10:28:54 +01:00
parent 640c5ec88d
commit d8def24e0c
2 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ export class UserResolver {
await queryRunner.startTransaction('READ UNCOMMITTED')
try {
if (coinanimation) {
if (coinanimation !== undefined) {
queryRunner.manager
.getCustomRepository(UserSettingRepository)
.setOrUpdate(userEntity.id, Setting.COIN_ANIMATION, coinanimation.toString())

View File

@ -18,7 +18,7 @@ export class UserSettingRepository extends Repository<UserSetting> {
let entity = await this.findOne({ userId: userId, key: key })
if (!entity) {
entity = new UserSetting()
entity = this.create()
entity.userId = userId
entity.key = key
}