mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
take createdAt if updatedAt is not present
This commit is contained in:
parent
0a545c5fbe
commit
a347b337c6
@ -50,7 +50,13 @@ export class AdminResolver {
|
||||
userId: user.id,
|
||||
emailOptInTypeId: EMAIL_OPT_IN_REGISTER,
|
||||
})
|
||||
if (emailOptIn) adminUser.emailConfirmationSend = emailOptIn.updatedAt.toISOString()
|
||||
if (emailOptIn) {
|
||||
if (emailOptIn.updatedAt) {
|
||||
adminUser.emailConfirmationSend = emailOptIn.updatedAt.toISOString()
|
||||
} else {
|
||||
adminUser.emailConfirmationSend = emailOptIn.createdAt.toISOString()
|
||||
}
|
||||
}
|
||||
}
|
||||
return adminUser
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user