Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
services
mailer
Commits
f9306730
Commit
f9306730
authored
Jan 22, 2019
by
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
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
docker-compose.yml
View file @
f9306730
...
...
@@ -8,7 +8,6 @@ services:
-
${DEV_SERVICE_EMAIL_PORT}:3000
environment
:
-
NODE_ENV=${NODE_ENV}
-
ADMIN_EMAILS=${DEV_ADMIN_EMAILS}
-
PLATEFORM_DATA_EMAIL=${DEV_PLATEFORM_DATA_EMAIL}
-
RABBITMQ_USER=${DEV_RABBITMQ_USER}
-
RABBITMQ_PASSWORD=${DEV_RABBITMQ_PASSWORD}
...
...
src/configuration/config.service.ts
View file @
f9306730
...
...
@@ -20,7 +20,6 @@ export class ConfigService {
// Initializing conf with values from var env
this
.
_config
.
rabbitMQ
.
user
=
process
.
env
.
RABBITMQ_USER
;
this
.
_config
.
rabbitMQ
.
password
=
process
.
env
.
RABBITMQ_PASSWORD
;
this
.
_config
.
adminEmails
=
process
.
env
.
ADMIN_EMAILS
.
split
(
'
,
'
);
this
.
_config
.
plateformDataEmail
=
process
.
env
.
PLATEFORM_DATA_EMAIL
;
}
...
...
src/configuration/config.ts
View file @
f9306730
...
...
@@ -6,6 +6,5 @@ export const config = {
port
:
'
5672
'
,
},
mailerQueue
:
'
portail-data-send-email
'
,
adminEmails
:
[],
plateformDataEmail
:
''
,
};
\ No newline at end of file
src/configuration/template.env
View file @
f9306730
RABBITMQ_USER=
RABBITMQ_PASSWORD=
ADMIN_EMAILS=
\ No newline at end of file
PLATEFORM_DATA_EMAIL=
\ No newline at end of file
src/email/email.service.ts
View file @
f9306730
...
...
@@ -19,7 +19,7 @@ export class EmailService {
const
email
=
new
Email
();
email
.
from
=
`
${
contactForm
.
firstname
}
${
contactForm
.
lastname
}
${
contactForm
.
from
}
`
;
email
.
to
=
this
.
config
.
admin
Email
s
;
email
.
to
=
this
.
config
.
plateformData
Email
;
email
.
subject
=
contactForm
.
subject
;
email
.
text
=
contactForm
.
text
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment