fixed save optin code problem,

corrected URL
This commit is contained in:
Ulf Gebhardt 2021-11-24 04:12:01 +01:00
parent 0c8e79bc74
commit 4bdcff8152
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 2 additions and 3 deletions

View File

@ -51,8 +51,7 @@ const email = {
EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587',
EMAIL_LINK_VERIFICATION:
process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/vue/checkEmail/$1',
EMAIL_LINK_SETPASSWORD:
process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/vue/setPassword/$1',
EMAIL_LINK_SETPASSWORD: process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/vue/reset/$1',
}
// This is needed by graphql-directive-auth

View File

@ -402,7 +402,7 @@ export class UserResolver {
optInCode.verificationCode = random(64)
optInCode.userId = loginUser.id
optInCode.emailOptInTypeId = EMAIL_OPT_IN_RESET_PASSWORD
await optInCode.save()
await loginEmailOptInRepository.save(optInCode)
}
const link = CONFIG.EMAIL_LINK_SETPASSWORD.replace(