added enums to replace constants

This commit is contained in:
unknown
2024-10-06 15:44:49 +03:00
parent a5c1cad01c
commit 9a868c5757
68 changed files with 547 additions and 202 deletions

View File

@ -1,11 +1,12 @@
import { registerAs } from '@nestjs/config';
import { BooleanValues } from '../constants/boolean-values.enum';
export default registerAs(
'email-config',
(): Record<string, any> => ({
SMTP_HOST: process.env.SMTP_HOST,
SMTP_PORT: parseInt(process.env.SMTP_PORT),
SMTP_SECURE: process.env.SMTP_SECURE === 'true',
SMTP_SECURE: process.env.SMTP_SECURE === BooleanValues.TRUE,
SMTP_USER: process.env.SMTP_USER,
SMTP_SENDER: process.env.SMTP_SENDER,
SMTP_PASSWORD: process.env.SMTP_PASSWORD,