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 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 }, 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") {