mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
- do not send error email
- return after finally block due to unknown behaviour?!
This commit is contained in:
parent
45e82c1aff
commit
d15b9a7e3c
@ -384,11 +384,6 @@ export class UserResolver {
|
|||||||
emailOptIn.emailOptInTypeId = 2
|
emailOptIn.emailOptInTypeId = 2
|
||||||
|
|
||||||
await queryRunner.manager.save(emailOptIn).catch((error) => {
|
await queryRunner.manager.save(emailOptIn).catch((error) => {
|
||||||
// TODO: Send error email instead of throw error
|
|
||||||
// if (!emailOptInModel->insertIntoDB(false)) {
|
|
||||||
// emailOptInModel->sendErrorsAsEmail();
|
|
||||||
// return stateError("insert emailOptIn failed");
|
|
||||||
// }
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('Error while saving emailOptIn', error)
|
console.log('Error while saving emailOptIn', error)
|
||||||
throw new Error('error saving email opt in')
|
throw new Error('error saving email opt in')
|
||||||
@ -397,7 +392,6 @@ export class UserResolver {
|
|||||||
// emailOptIn->setBaseUrl(user->getGroupBaseUrl() + ServerConfig::g_frontend_checkEmailPath);
|
// emailOptIn->setBaseUrl(user->getGroupBaseUrl() + ServerConfig::g_frontend_checkEmailPath);
|
||||||
// em->addEmail(new model::Email(emailOptIn, user, model::Email::convertTypeFromInt(emailType)));
|
// em->addEmail(new model::Email(emailOptIn, user, model::Email::convertTypeFromInt(emailType)));
|
||||||
await queryRunner.commitTransaction()
|
await queryRunner.commitTransaction()
|
||||||
return 'success'
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await queryRunner.rollbackTransaction()
|
await queryRunner.rollbackTransaction()
|
||||||
await rollbackAutoIncrement(queryRunner, LoginUser, `login_users`)
|
await rollbackAutoIncrement(queryRunner, LoginUser, `login_users`)
|
||||||
@ -407,6 +401,7 @@ export class UserResolver {
|
|||||||
} finally {
|
} finally {
|
||||||
await queryRunner.release()
|
await queryRunner.release()
|
||||||
}
|
}
|
||||||
|
return 'success'
|
||||||
}
|
}
|
||||||
|
|
||||||
@Query(() => SendPasswordResetEmailResponse)
|
@Query(() => SendPasswordResetEmailResponse)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user