Fix environment variable casting (#4855)

Fixes #4628
This commit is contained in:
Félix Malfait
2024-04-05 18:15:47 +02:00
committed by GitHub
parent bbdb926687
commit bffd73e391
8 changed files with 21 additions and 37 deletions

View File

@@ -1,17 +1,11 @@
import { ConfigService } from '@nestjs/config';
import console from 'console';
import { DataSource } from 'typeorm';
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
const environmentService = new EnvironmentService(new ConfigService());
export const connectionSource = new DataSource({
type: 'postgres',
logging: false,
url: environmentService.get('PG_DATABASE_URL'),
url: process.env.PG_DATABASE_URL,
});
export const camelToSnakeCase = (str) =>