From 296ba8ddab1dba46f8201829d9a7e5fc1c88c0f8 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 11 Dec 2024 18:40:21 +0100 Subject: [PATCH] FRONTEND_URL env --- .env.example | 3 ++- README.md | 1 + src/mailer.ts | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 565a391..b180f2c 100644 --- a/.env.example +++ b/.env.example @@ -7,4 +7,5 @@ DB_PASSWORD=bla DB_NAME=./test.sqlite NODE_ENV=production POSTALCODE_COUNTRYCODE=DE -SEED_TEST_DATA=false \ No newline at end of file +SEED_TEST_DATA=false +FRONTEND_URL=bla \ No newline at end of file diff --git a/README.md b/README.md index cbbfcd0..038cac9 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ pnpm docs | SEED_TEST_DATA | Boolean | False | If you want the app to seed some example data set this to true | | MAILER_URL | String(Url) | N/A | The mailer's base url (no trailing slash) | | MAILER_KEY | String | N/A | The mailer's api key. | +| FRONTEND_URL | String(Url) | N/A | The link to frontend (no trailing slash) | | IMPRINT_URL | String(Url) | /imprint | The link to a imprint page for the system (Defaults to the frontend's imprint) | | PRIVACY_URL | String(Url) | /privacy | The link to a privacy page for the system (Defaults to the frontend's privacy page) | diff --git a/src/mailer.ts b/src/mailer.ts index e658af6..0a419b2 100644 --- a/src/mailer.ts +++ b/src/mailer.ts @@ -59,7 +59,7 @@ export class Mailer { data: { name: `${firstname} ${middlename} ${lastname}`, barcode_content: `${runner_id}`, - link: 'https://portal.lauf-fuer-kaya.de/profile/' + token + link: `${process.env.FRONTEND_URL}/profile/${token}` } } }); @@ -90,7 +90,7 @@ export class Mailer { data: { name: `${firstname} ${middlename} ${lastname}`, barcode_content: `${runner_id}`, - link: 'https://portal.lauf-fuer-kaya.de/profile/' + token + link: `${process.env.FRONTEND_URL}/profile/${token}` } } });