diff --git a/backend/.env.dist b/backend/.env.dist index 033417025..a820780ab 100644 --- a/backend/.env.dist +++ b/backend/.env.dist @@ -1,4 +1,4 @@ -CONFIG_VERSION=v4.2022-04-05 +CONFIG_VERSION=v5.2022-04-12 # Server PORT=4000 @@ -45,6 +45,7 @@ EMAIL_LINK_SETPASSWORD=http://localhost/reset-password/{optin} EMAIL_LINK_FORGOTPASSWORD=http://localhost/forgot-password EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_REQUEST_TIME=10 +EMAIL_CLIENT_URI=http://localhost # Webhook WEBHOOK_ELOPAGE_SECRET=secret \ No newline at end of file diff --git a/backend/.env.template b/backend/.env.template index 011e413df..d66217ebf 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -43,6 +43,7 @@ EMAIL_LINK_VERIFICATION=$EMAIL_LINK_VERIFICATION EMAIL_LINK_SETPASSWORD=$EMAIL_LINK_SETPASSWORD EMAIL_CODE_VALID_TIME=$EMAIL_CODE_VALID_TIME EMAIL_CODE_REQUEST_TIME=$EMAIL_CODE_REQUEST_TIME +EMAIL_CLIENT_URI=$EMAIL_CLIENT_URI # Webhook WEBHOOK_ELOPAGE_SECRET=$WEBHOOK_ELOPAGE_SECRET \ No newline at end of file diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index fe9b40ccc..c69f9c92a 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -14,7 +14,7 @@ const constants = { DECAY_START_TIME: new Date('2021-05-13 17:46:31'), // GMT+0 CONFIG_VERSION: { DEFAULT: 'DEFAULT', - EXPECTED: 'v4.2022-04-05', + EXPECTED: 'v5.2022-04-12', CURRENT: '', }, } @@ -80,6 +80,7 @@ const email = { EMAIL_CODE_REQUEST_TIME: process.env.EMAIL_CODE_REQUEST_TIME ? parseInt(process.env.EMAIL_CODE_REQUEST_TIME) || 10 : 10, + EMAIL_CLIENT_URI: process.env.EMAIL_CLIENT_URI || 'http://localhost', } const webhook = { diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 5b7956656..00caba002 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -3,6 +3,8 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ +import CONFIG from '@/config' + import { Resolver, Query, Args, Authorized, Ctx, Mutation } from 'type-graphql' import { getCustomRepository, getConnection } from '@dbTools/typeorm' @@ -125,7 +127,7 @@ export const executeTransaction = async ( } // send notification email - const overviewURL = new URL('/overview' /* , XXX CONFIG.CLIENT_URI */) // http://localhost/overview + const overviewURL = new URL('/overview', CONFIG.EMAIL_CLIENT_URI) // TODO: translate await sendTransactionReceivedEmail({ senderFirstName: sender.firstName, diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index 8254fd9c2..1b287fe47 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -18,7 +18,7 @@ WEBHOOK_GITHUB_SECRET=secret WEBHOOK_GITHUB_BRANCH=master # backend -BACKEND_CONFIG_VERSION=v4.2022-04-05 +BACKEND_CONFIG_VERSION=v5.2022-04-12 JWT_EXPIRES_IN=30m GDT_API_URL=https://gdt.gradido.net @@ -46,6 +46,7 @@ EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset-password/{optin} EMAIL_LINK_FORGOTPASSWORD=https://stage1.gradido.net/forgot-password EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_REQUEST_TIME=10 +EMAIL_CLIENT_URI=https://stage1.gradido.net WEBHOOK_ELOPAGE_SECRET=secret