mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Fixe model for User and adding hasElopage to User Object.
This commit is contained in:
parent
36e6a459a4
commit
d3198b037e
@ -19,7 +19,7 @@ export class User {
|
|||||||
this.pubkey = json.public_hex
|
this.pubkey = json.public_hex
|
||||||
this.language = json.language
|
this.language = json.language
|
||||||
this.publisherId = json.publisher_id
|
this.publisherId = json.publisher_id
|
||||||
if (json.hasElopage) this.hasElopage = json.hasElopage
|
this.hasElopage = json.hasElopage
|
||||||
}
|
}
|
||||||
|
|
||||||
@Field(() => String)
|
@Field(() => String)
|
||||||
@ -76,6 +76,6 @@ export class User {
|
|||||||
@Field(() => KlickTipp)
|
@Field(() => KlickTipp)
|
||||||
klickTipp: KlickTipp
|
klickTipp: KlickTipp
|
||||||
|
|
||||||
@Field(() => Boolean)
|
@Field(() => Boolean, { nullable: true })
|
||||||
hasElopage?: boolean
|
hasElopage?: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,7 @@ export class UserResolver {
|
|||||||
value: encode(result.data.session_id, result.data.user.public_hex),
|
value: encode(result.data.session_id, result.data.user.public_hex),
|
||||||
})
|
})
|
||||||
const user = new User(result.data.user)
|
const user = new User(result.data.user)
|
||||||
|
user.hasElopage = result.data.hasElopage
|
||||||
// read additional settings from settings table
|
// read additional settings from settings table
|
||||||
const userRepository = getCustomRepository(UserRepository)
|
const userRepository = getCustomRepository(UserRepository)
|
||||||
const userEntity = await userRepository.findByPubkeyHex(user.pubkey)
|
const userEntity = await userRepository.findByPubkeyHex(user.pubkey)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user