Skip to content
Open
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
10 changes: 10 additions & 0 deletions .env-example

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point, we should see whether CDS_NOTIFY... stuff is still necessary. It probably isn't and should probably be deleted. But not now. We can focus on removing alpha for now.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ CDS_NOTIFY_KEY=
CDS_NOTIFY_SEND_EMAIL_TO=["email@ example.com"]
CDS_NOTIFY_TEMPLATE_ID=

# Service Canada notify key, when an error occur
OUR_NOTIFY_END_POINT="https://api.notification.canada.ca"
OUR_NOTIFY_KEY=
OUR_NOTIFY_TEMPLATE_ID=
OUR_NOTIFY_SEND_EMAIL_TO=[]

notifyEndPoint="https://api.notification.canada.ca"



AWS_ACCESS_KEY=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET=
Expand Down
2 changes: 1 addition & 1 deletion controllers/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const processEnv = process.env,
_successJSO = processEnv.successJSO || { statusCode: 200, ok: 1 },
_cErrorsJSO = processEnv.cErrorsJSO || { statusCode: 400, bad: 1, msg: "Bad request" },
_sErrorsJSO = processEnv.sErrorsJSO || { statusCode: 500, err: 1 },
_notifyEndPoint = processEnv.notifyEndPoint || "https://api.notification.alpha.canada.ca",
_notifyEndPoint = processEnv.notifyEndPoint || "https://api.notification.canada.ca",
_confirmBaseURL = processEnv.confirmBaseURL || "https://apps.canada.ca/x-notify/subs/confirm/",
_nbMinutesBF = processEnv.notSendBefore || 25, // Default of 25 minutes.
_bypassSubscode = processEnv.subscode,
Expand Down
2 changes: 1 addition & 1 deletion controllers/workerSendEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if ( !workerData ) {
const { topicId, mailingSubject, mailingBody, typeMailing, sentTo } = workerData;

const processEnv = process.env,
_notifyEndPoint = processEnv.notifyEndPoint || "https://api.notification.alpha.canada.ca",
_notifyEndPoint = processEnv.notifyEndPoint || "https://api.notification.canada.ca",
_unsubBaseURL = process.env.removeURL || "https://apps.canada.ca/x-notify/subs/remove/",
_subsLinkSuffix = process.env.subsLinkSuffix || "853e0212b92a127"

Expand Down
2 changes: 1 addition & 1 deletion setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Create a user in Database (for local database)
* `successJSO` JavaScript Object returned on successful JSON API call. Default: `{ statusCode: 200, ok: 1 }`
* `cErrorsJSO` JavaScript Object returned on client error, like bad email format or missing parameter. Default `{ statusCode: 400, bad: 1, msg: "Bad request" }`
* `sErrorsJSO` JavaScript Object returned on client error, like MongoDB can't connect. Default: `{ statusCode: 500, err: 1 }`
* `notifyEndPoint` Notify end point. Default: `https://api.notification.alpha.canada.ca`
* `notifyEndPoint` Notify end point. Default: `https://api.notification.canada.ca`
* `notSendBefore` Number of minute before to accept a resend email request. Default: `25`

* `Host` URL of the host server. Default: `0.0.0.0`
Expand Down