mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Adding hasElopage and publisherId logic, hasElopage is called and checks if in ElopageBuys their is a user with this email, if hasElopage and publisherId is filled store it in the user table.
This commit is contained in:
parent
1baf756c08
commit
e976c6854d
@ -236,7 +236,10 @@ export class UserResolver {
|
|||||||
user.pubkey = loginUserPubKeyString
|
user.pubkey = loginUserPubKeyString
|
||||||
user.language = loginUser.language
|
user.language = loginUser.language
|
||||||
user.hasElopage = await this.hasElopage({ pubkey: loginUser.pubKey })
|
user.hasElopage = await this.hasElopage({ pubkey: loginUser.pubKey })
|
||||||
|
if (!user.hasElopage && publisherId) {
|
||||||
|
user.publisherId = publisherId
|
||||||
|
await this.updateUserInfos({ publisherId }, { pubKey: loginUser.pubKey })
|
||||||
|
}
|
||||||
// TODO: Get Method from PR (publisherId)
|
// TODO: Get Method from PR (publisherId)
|
||||||
// Hack: Database Field is not validated properly and not nullable
|
// Hack: Database Field is not validated properly and not nullable
|
||||||
// if (user.publisherId === 0) {
|
// if (user.publisherId === 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user