mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
set field type on creating new userContact
This commit is contained in:
parent
bb69008f5f
commit
093a2d4745
@ -6,6 +6,7 @@ import { getLogger } from 'log4js'
|
||||
import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const'
|
||||
import { SendCoinsResult } from '../../federation/client/1_0/model/SendCoinsResult'
|
||||
import { UserLoggingView, UserContactLoggingView } from 'database'
|
||||
import { UserContactType } from 'shared'
|
||||
|
||||
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.logic.storeForeignUser`)
|
||||
|
||||
@ -78,6 +79,7 @@ export async function storeForeignUser(
|
||||
if(!user.emailContact && committingResult.recipEmail !== null) {
|
||||
logger.debug('creating new userContact:', new UserContactLoggingView(user.emailContact), committingResult)
|
||||
let foreignUserEmail = DbUserContact.create()
|
||||
foreignUserEmail.type = UserContactType.USER_CONTACT_EMAIL
|
||||
foreignUserEmail.email = committingResult.recipEmail!
|
||||
foreignUserEmail.emailChecked = true
|
||||
foreignUserEmail.user = user
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user