From bcad691045d00c9630bedb0936c123610b655946 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 2 Feb 2021 15:04:09 +0100 Subject: [PATCH 1/3] Added new url env vars to config ref #135 --- src/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index d2840da..2e52f56 100644 --- a/src/config.ts +++ b/src/config.ts @@ -16,7 +16,9 @@ export const config = { mail_port: Number(process.env.MAIL_PORT) || 25, mail_user: process.env.MAIL_USER, mail_password: process.env.MAIL_PASSWORD, - mail_from: process.env.MAIL_FROM + mail_from: process.env.MAIL_FROM, + privacy_url: process.env.PRIVACY_URL || "/privacy", + imprint_url: process.env.IMPRINT_URL || "/imprint" } let errors = 0 if (typeof config.internal_port !== "number") { From f4f621973aa98645dee3d43252bb18f125087c54 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 2 Feb 2021 15:07:33 +0100 Subject: [PATCH 2/3] Added imprint and privacy to the api spec ref #135 --- src/apispec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apispec.ts b/src/apispec.ts index de38236..647e9ed 100644 --- a/src/apispec.ts +++ b/src/apispec.ts @@ -42,7 +42,7 @@ export function generateSpec(storage: MetadataArgsStorage, schemas) { } }, info: { - description: "The the backend API for the LfK! runner system.", + description: `The the backend API for the LfK! runner system.
[Imprint](${config.imprint_url}) & [Privacy](${config.privacy_url})`, title: "LfK! Backend API", version: config.version }, From 333e806da42d7654e2b9fc13abae984726c689e7 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 2 Feb 2021 15:10:04 +0100 Subject: [PATCH 3/3] Added documentation about the new env vars to the readme ref #135 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8d538ea..51b2d70 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,9 @@ yarn docs | MAIL_USER | String | N/A | The username for sending mails | MAIL_PASSWORD | String | N/A | The user's password for sending mails | MAIL_FROM | String | N/A | The from-address for sending mails +| 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) + ## Recommended Editor