mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
emails are not awaitable anymore
This commit is contained in:
parent
2488fe7b68
commit
bbe1167b97
@ -50,8 +50,8 @@ describe('sendEmailVariants', () => {
|
||||
let result: any
|
||||
|
||||
describe('sendAddedContributionMessageEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendAddedContributionMessageEmail({
|
||||
beforeAll(() => {
|
||||
result = sendAddedContributionMessageEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -128,8 +128,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendAccountActivationEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendAccountActivationEmail({
|
||||
beforeAll(() => {
|
||||
result = sendAccountActivationEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -208,8 +208,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendAccountMultiRegistrationEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendAccountMultiRegistrationEmail({
|
||||
beforeAll(() => {
|
||||
result = sendAccountMultiRegistrationEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -288,8 +288,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendContributionConfirmedEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendContributionConfirmedEmail({
|
||||
beforeAll(() => {
|
||||
result = sendContributionConfirmedEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -368,8 +368,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendContributionDeniedEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendContributionDeniedEmail({
|
||||
beforeAll(() => {
|
||||
result = sendContributionDeniedEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -446,8 +446,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendContributionDeletedEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendContributionDeletedEmail({
|
||||
beforeAll(() => {
|
||||
result = sendContributionDeletedEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -524,8 +524,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendResetPasswordEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendResetPasswordEmail({
|
||||
beforeAll(() => {
|
||||
result = sendResetPasswordEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -602,8 +602,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendTransactionLinkRedeemedEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendTransactionLinkRedeemedEmail({
|
||||
beforeAll(() => {
|
||||
result = sendTransactionLinkRedeemedEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
@ -683,8 +683,8 @@ describe('sendEmailVariants', () => {
|
||||
})
|
||||
|
||||
describe('sendTransactionReceivedEmail', () => {
|
||||
beforeAll(async () => {
|
||||
result = await sendTransactionReceivedEmail({
|
||||
beforeAll(() => {
|
||||
result = sendTransactionReceivedEmail({
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
email: 'peter@lustig.de',
|
||||
|
||||
@ -146,7 +146,7 @@ export class ContributionMessageResolver {
|
||||
await queryRunner.manager.update(DbContribution, { id: contributionId }, contribution)
|
||||
}
|
||||
|
||||
void sendAddedContributionMessageEmail({
|
||||
sendAddedContributionMessageEmail({
|
||||
firstName: contribution.user.firstName,
|
||||
lastName: contribution.user.lastName,
|
||||
email: contribution.user.emailContact.email,
|
||||
|
||||
@ -424,7 +424,7 @@ export class ContributionResolver {
|
||||
contribution.amount,
|
||||
)
|
||||
|
||||
void sendContributionDeletedEmail({
|
||||
sendContributionDeletedEmail({
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
email: user.emailContact.email,
|
||||
@ -518,7 +518,7 @@ export class ContributionResolver {
|
||||
|
||||
await queryRunner.commitTransaction()
|
||||
logger.info('creation commited successfuly.')
|
||||
void sendContributionConfirmedEmail({
|
||||
sendContributionConfirmedEmail({
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
email: user.emailContact.email,
|
||||
@ -599,7 +599,7 @@ export class ContributionResolver {
|
||||
contributionToUpdate.amount,
|
||||
)
|
||||
|
||||
void sendContributionDeniedEmail({
|
||||
sendContributionDeniedEmail({
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
email: user.emailContact.email,
|
||||
|
||||
@ -149,7 +149,7 @@ export const executeTransaction = async (
|
||||
} finally {
|
||||
await queryRunner.release()
|
||||
}
|
||||
void sendTransactionReceivedEmail({
|
||||
sendTransactionReceivedEmail({
|
||||
firstName: recipient.firstName,
|
||||
lastName: recipient.lastName,
|
||||
email: recipient.emailContact.email,
|
||||
@ -160,7 +160,7 @@ export const executeTransaction = async (
|
||||
transactionAmount: amount,
|
||||
})
|
||||
if (transactionLink) {
|
||||
void sendTransactionLinkRedeemedEmail({
|
||||
sendTransactionLinkRedeemedEmail({
|
||||
firstName: sender.firstName,
|
||||
lastName: sender.lastName,
|
||||
email: sender.emailContact.email,
|
||||
|
||||
@ -245,7 +245,7 @@ export class UserResolver {
|
||||
user.publisherId = publisherId
|
||||
logger.debug('partly faked user', user)
|
||||
|
||||
void sendAccountMultiRegistrationEmail({
|
||||
sendAccountMultiRegistrationEmail({
|
||||
firstName: foundUser.firstName, // this is the real name of the email owner, but just "firstName" would be the name of the new registrant which shall not be passed to the outside
|
||||
lastName: foundUser.lastName, // this is the real name of the email owner, but just "lastName" would be the name of the new registrant which shall not be passed to the outside
|
||||
email,
|
||||
@ -322,7 +322,7 @@ export class UserResolver {
|
||||
emailContact.emailVerificationCode.toString(),
|
||||
).replace(/{code}/g, redeemCode ? '/' + redeemCode : '')
|
||||
|
||||
void sendAccountActivationEmail({
|
||||
sendAccountActivationEmail({
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
@ -385,7 +385,7 @@ export class UserResolver {
|
||||
|
||||
logger.info(`optInCode for ${email}=${user.emailContact}`)
|
||||
|
||||
void sendResetPasswordEmail({
|
||||
sendResetPasswordEmail({
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
email,
|
||||
@ -789,7 +789,7 @@ export class UserResolver {
|
||||
await user.emailContact.save()
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const emailSent = await sendAccountActivationEmail({
|
||||
sendAccountActivationEmail({
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
email,
|
||||
@ -798,10 +798,6 @@ export class UserResolver {
|
||||
timeDurationObject: getTimeDurationObject(CONFIG.EMAIL_CODE_VALID_TIME),
|
||||
})
|
||||
|
||||
// In case EMails are disabled log the activation link for the user
|
||||
if (!emailSent) {
|
||||
logger.info(`Account confirmation link: ${activationLink}`)
|
||||
}
|
||||
await EVENT_EMAIL_ADMIN_CONFIRMATION(user, getUser(context))
|
||||
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user