Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ MICROSOFT_TENANT_ID = secret
MICROSOFT_CLIENT_ID = secret

AUTH_HEADER = secret
URL_ORIGIN = lara.exampleCompany
DEBUG = true

COMPANY_ABBREVIATION = exp
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/reusable-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
MICROSOFT_TENANT_ID: ${{ secrets.MICROSOFT_TENANT_ID }}
MICROSOFT_CLIENT_ID: ${{ secrets.MICROSOFT_CLIENT_ID }}
SUPPORT_MAIL: ${{ secrets.SUPPORT_MAIL }}
URL_ORIGIN: ${{ secrets.URL_ORIGIN }}
COMPANY_ABBREVIATION: ${{ secrets.COMPANY_ABBREVIATION }}
OLD_COMPANY_NAME: ${{ secrets.OLD_COMPANY_NAME }}
NEW_COMPANY_NAME: ${{ secrets.NEW_COMPANY_NAME }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/reusable-deploy-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
LARA_SECRET: ${{ secrets.LARA_SECRET }}
SES_EMAIL: ${{ secrets.SES_EMAIL }}
SUPPORT_MAIL: ${{ secrets.SUPPORT_MAIL }}
URL_ORIGIN: ${{ secrets.URL_ORIGIN }}
COMPANY_ABBREVIATION: ${{ secrets.COMPANY_ABBREVIATION }}
OLD_COMPANY_NAME: ${{ secrets.OLD_COMPANY_NAME }}
NEW_COMPANY_NAME: ${{ secrets.NEW_COMPANY_NAME }}
Expand Down
6 changes: 2 additions & 4 deletions packages/backend/src/services/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ import { allAdmins } from '../repositories/admin.repo'
import { traineeById } from '../repositories/trainee.repo'
import { trainerById } from '../repositories/trainer.repo'

const { STAGE, URL_ORIGIN } = process.env
const { FRONTEND_URL } = process.env

const translations = (user: User): EmailTranslations =>
t('email', user.language, { interpolation: { prefix: 'turnOff', suffix: 'turnOff' } })

const envLink = (path: string) => {
const envDomain = STAGE === 'staging' ? 'staging.' : ''

return `https://${envDomain}${URL_ORIGIN}${path}`
return `${FRONTEND_URL}${path}`
}

const trainerNotificationMailPayload = (receiver: Trainer, sender: Trainee, report: Report): EmailPayload => ({
Expand Down
4 changes: 0 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ PDF printing is developed inside `packages/print`. Run `yarn debug` inside this
- String containing AWS IAM User ID used for deployment
- AWS_SECRET_ACCESS_KEY
- String containing AWS IAM User Secret Key used for deployment
- URL_ORIGIN
- String containing the origin of the environments. Used in emails. E.g.: lara.exampleCompany
- COMPANY_ABBREVIATION
- Shortform of your companies name to create s3-buckets
- OLD_COMPANY_NAME
Expand Down Expand Up @@ -151,8 +149,6 @@ The following variables can be added to your cloned version of Lara.
- String containing AWS IAM User Secret Key used for deployment
- AUTH_HEADER
- String containing the value for the authorization header
- URL_ORIGIN
- String containing the origin of the environments. Used in emails. E.g.: lara.exampleCompany
- DEBUG
- More information is shown in the console. Not necessary for production.
- COMPANY_ABBREVIATION
Expand Down