Skip to content

Commit

Permalink
Merge pull request #44 from bde-isima/staging
Browse files Browse the repository at this point in the history
Use contact email address in environment variable
  • Loading branch information
citorva authored Jan 11, 2023
2 parents ac3ba08 + 5f8ed68 commit 7cfb66f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ SESSION_SECRET_KEY=generate_on_https://randomkeygen.com
SMTP_HOST=smtp.gmail.com
SMTP_PASSWORD=your_password
SMTP_PORT=587

CONTACT_MAIL=contact@example.com
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: SpicyPizza/create-envfile@v1
with:
envkey_NODE_ENV: production
envkey_CONTACT_MAIL: ${{ secrets.CONTACT_MAIL }}
envkey_DATABASE_URL: ${{ secrets.DATABASE_URL }}
envkey_SESSION_SECRET_KEY: ${{ secrets.SESSION_SECRET_KEY }}
envkey_LYF_API_VENDOR_ID: ${{ secrets.LYF_API_VENDOR_ID }}
Expand Down
2 changes: 1 addition & 1 deletion app/entities/users/mutations/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default resolver.pipe(async ({ subject, message, email }: ContactInput) =
try {
await mail.send({
subject,
to: `${process.env.NODE_ENV !== 'production' ? 'bde.isima' : 'bde.isima.webmaster'}+contact@gmail.com`,
to: `${process.env.CONTACT_MAIL}`,
view: 'contact',
variables: {
subject,
Expand Down

0 comments on commit 7cfb66f

Please sign in to comment.