remove copy user disabled field

This commit is contained in:
einhornimmond 2021-10-12 15:42:48 +02:00
parent 86efd0de80
commit 0640eb24d5
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,6 @@ export class User {
this.pubkey = json.public_hex
this.language = json.language
this.publisherId = json.publisher_id
this.disabled = json.disabled
}
@Field(() => String)
@ -57,8 +56,10 @@ export class User {
@Field(() => String)
language: string
/*
@Field(() => Boolean)
disabled: boolean
*/
/* I suggest to have a group as type here
@Field(() => ID)

View File

@ -56,7 +56,7 @@ export class UserResolver {
userEntity.username = user.username
userEntity.email = user.email
userEntity.pubkey = Buffer.from(fromHex(user.pubkey))
userEntity.disabled = user.disabled
userEntity.save().catch(() => {
throw new Error('error by save userEntity')
@ -125,7 +125,6 @@ export class UserResolver {
dbuser.firstName = user.firstName
dbuser.lastName = user.lastName
dbuser.username = user.username
dbuser.disabled = user.disabled
dbuser.save().catch(() => {
throw new Error('error saving user')