diff --git a/src/common/config/variables/Variables.ts b/src/common/config/variables/Variables.ts index e2c2169f..81315166 100644 --- a/src/common/config/variables/Variables.ts +++ b/src/common/config/variables/Variables.ts @@ -64,6 +64,9 @@ export class BackendVariables { @IsNotEmpty() public readonly ENV!: string; + @IsNotEmpty() + public readonly DEV_PRISMA_STUDIO_DB_URL!: string; + public constructor() { dotenv.config(); this.DATABASE_PORT = process.env["DATABASE_PORT"]!; @@ -86,8 +89,11 @@ export class BackendVariables { this.REFRESH_TOKEN_SECRET = process.env["REFRESH_TOKEN_SECRET"]!; this.MAILCHIMP_API_KEY = process.env["MAILCHIMP_API_KEY"]!; this.ENV = process.env["ENV"]!; + this.DEV_PRISMA_STUDIO_DB_URL = "postgresql://" + this.DATABASE_USERNAME + ":" + this.DATABASE_PASSWORD + "@" + this.DATABASE_HOST + ":" + this.DATABASE_PORT + "/" + this.DATABASE_NAME; } public async validate(groups?: string[]) { + console.log(this.DEV_PRISMA_STUDIO_DB_URL); + const validationOptions = groups ? { groups } : undefined; try {