From 646863f290629f7a45cf1aa6546e088ad5fd59eb Mon Sep 17 00:00:00 2001 From: Shiva Kayathi Date: Sat, 1 Aug 2026 00:14:13 -0400 Subject: [PATCH] CENS-119 - remove alpha url reference from gcNotify api --- .env-example | 10 ++++++++++ controllers/subscriptions.js | 2 +- controllers/workerSendEmail.js | 2 +- setup.md | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.env-example b/.env-example index 3c10a78..f332429 100644 --- a/.env-example +++ b/.env-example @@ -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= diff --git a/controllers/subscriptions.js b/controllers/subscriptions.js index fba4220..15c04ca 100644 --- a/controllers/subscriptions.js +++ b/controllers/subscriptions.js @@ -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, diff --git a/controllers/workerSendEmail.js b/controllers/workerSendEmail.js index 8e94861..79cf4dd 100644 --- a/controllers/workerSendEmail.js +++ b/controllers/workerSendEmail.js @@ -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" diff --git a/setup.md b/setup.md index 4bf4884..e3103ea 100644 --- a/setup.md +++ b/setup.md @@ -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`