Commit f9306730 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Use only one var env for the admin email/ email of the platforme

parent 0cb21e7d
Pipeline #2496 passed with stages
in 25 seconds
...@@ -8,7 +8,6 @@ services: ...@@ -8,7 +8,6 @@ services:
- ${DEV_SERVICE_EMAIL_PORT}:3000 - ${DEV_SERVICE_EMAIL_PORT}:3000
environment: environment:
- NODE_ENV=${NODE_ENV} - NODE_ENV=${NODE_ENV}
- ADMIN_EMAILS=${DEV_ADMIN_EMAILS}
- PLATEFORM_DATA_EMAIL=${DEV_PLATEFORM_DATA_EMAIL} - PLATEFORM_DATA_EMAIL=${DEV_PLATEFORM_DATA_EMAIL}
- RABBITMQ_USER=${DEV_RABBITMQ_USER} - RABBITMQ_USER=${DEV_RABBITMQ_USER}
- RABBITMQ_PASSWORD=${DEV_RABBITMQ_PASSWORD} - RABBITMQ_PASSWORD=${DEV_RABBITMQ_PASSWORD}
......
...@@ -20,7 +20,6 @@ export class ConfigService { ...@@ -20,7 +20,6 @@ export class ConfigService {
// Initializing conf with values from var env // Initializing conf with values from var env
this._config.rabbitMQ.user = process.env.RABBITMQ_USER; this._config.rabbitMQ.user = process.env.RABBITMQ_USER;
this._config.rabbitMQ.password = process.env.RABBITMQ_PASSWORD; this._config.rabbitMQ.password = process.env.RABBITMQ_PASSWORD;
this._config.adminEmails = process.env.ADMIN_EMAILS.split(',');
this._config.plateformDataEmail = process.env.PLATEFORM_DATA_EMAIL; this._config.plateformDataEmail = process.env.PLATEFORM_DATA_EMAIL;
} }
......
...@@ -6,6 +6,5 @@ export const config = { ...@@ -6,6 +6,5 @@ export const config = {
port: '5672', port: '5672',
}, },
mailerQueue: 'portail-data-send-email', mailerQueue: 'portail-data-send-email',
adminEmails: [],
plateformDataEmail: '', plateformDataEmail: '',
}; };
\ No newline at end of file
RABBITMQ_USER= RABBITMQ_USER=
RABBITMQ_PASSWORD= RABBITMQ_PASSWORD=
ADMIN_EMAILS= PLATEFORM_DATA_EMAIL=
\ No newline at end of file \ No newline at end of file
...@@ -19,7 +19,7 @@ export class EmailService { ...@@ -19,7 +19,7 @@ export class EmailService {
const email = new Email(); const email = new Email();
email.from = `${contactForm.firstname} ${contactForm.lastname} ${contactForm.from}`; email.from = `${contactForm.firstname} ${contactForm.lastname} ${contactForm.from}`;
email.to = this.config.adminEmails; email.to = this.config.plateformDataEmail;
email.subject = contactForm.subject; email.subject = contactForm.subject;
email.text = contactForm.text; email.text = contactForm.text;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment