Skip to content

Commit

Permalink
Merge pull request #48 from duboisp/release
Browse files Browse the repository at this point in the history
x-notify version 1.0
  • Loading branch information
GormFrank authored Jun 12, 2020
2 parents 2716a11 + fd6f39b commit b61ca86
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LOG_FORMAT=dev
user=<username>
password=<password>

keySalt=5417
keySalt=salt
validHosts=["localhost:8080"]


Expand Down
2 changes: 1 addition & 1 deletion controllers/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @description: Have a simpler way of dealing with manipulations in the database
* @author: Government of Canada; @duboisp; @GormFrank
* @version: 0.1
* @version: 1.0
*
* addTopic
* updateTopic
Expand Down
2 changes: 1 addition & 1 deletion controllers/managers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @description: Getting the subscription list and various bulk operation
* @author: Government of Canada; @duboisp
* @version: 0.1
* @version: 1.0
===========================*/

const AWS = require('aws-sdk');
Expand Down
2 changes: 1 addition & 1 deletion controllers/sendsmtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @description: Send an email through SMTP about a given topic
* @author: Government of Canada; @GormFrank
* @version: 0.1
* @version: 1.0
===========================*/

const nodemailer = require('nodemailer');
Expand Down
4 changes: 2 additions & 2 deletions controllers/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @description: Managing the client subscription to be notified about a given topic
* @author: Government of Canada; @duboisp
* @version: 0.1
* @version: 1.0
===========================*/

const NotifyClient = require('notifications-node-client').NotifyClient; // https://docs.notifications.service.gov.uk/node.html#node-js-client-documentation
Expand All @@ -15,7 +15,7 @@ const ObjectId = require('mongodb').ObjectId;

const processEnv = process.env,
_devLog = !!!processEnv.prodNoLog,
_keySalt = processEnv.keySalt || "5417",
_keySalt = processEnv.keySalt || "salt",
_validHosts = JSON.parse(processEnv.validHosts || '["localhost:8080"]'),
_errorPage = processEnv.errorPage || "https://canada.ca",
_successJSO = processEnv.successJSO || { statusCode: 200, ok: 1 },
Expand Down
2 changes: 1 addition & 1 deletion load-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
START=1 #Number to start loop with
END=3 #Number to stop at
delay=0.001 #Delay in seconds
IP="192.168.2.71" #IP address to run load test on
IP="127.0.0.1" #IP address to run load test on
topic="test2" #Topic ID
subscode="8yp45s-c0d3" #Usually 8yp45s-c0d3, which is leet for bypass-code
emailPrefix="bonjour" #Email prefix that will have an incremented number appended to
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "x-notify",
"version": "0.1.0",
"description": "Subscription to receive update via Notify",
"version": "1.0.0",
"description": "MVP subscription service to send email update via Notify from CDS. This MVP is going to be replaced by notification-dispatcher.",
"repository": {
"type": "git",
"url": "https://github.com/ServiceCanada/x-notify"
},
"license": "MIT",
"author": "Pierre Dubois",
"author": "Government of Canada",
"contributors": [
""
"duboisp",
"GormFrank"
],
"scripts": {
"start": "nodemon -L server.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/apps-28.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @description: Script to add the createdAt to existing subscription
* @author: Government of Canada; @duboisp
* @version: 0.1
* @version: 1.0
===========================*/

/* **************************
Expand Down
6 changes: 3 additions & 3 deletions test/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ Brief list of what to create test for
Subscribe

```
curl -i -X POST -H 'Content-Type: application/json' -d '{"eml": "pierre[email protected]", "tid": "test"}' http://192.168.1.205:8080/api/v0.1/subs/email/add
curl -i -X POST -H 'Content-Type: application/json' -d '{"eml": "pierre@example.com", "tid": "test"}' http://127.0.0.1:8080/api/v0.1/subs/email/add
```

Confirm

```
curl -i -X GET http://192.168.1.205:8080/subs/confirm/652700768/[email protected]
curl -i -X GET http://127.0.0.1:8080/subs/confirm/2d3903975209cbq2/87462102
```


Unsubscribe

```
curl -i -X GET http://192.168.1.205:8080/subs/remove/709931686/[email protected]
curl -i -X GET http://192.168.1.205:8080/subs/remove/2d3903975209cbq2/87462102
```

## database command
Expand Down

0 comments on commit b61ca86

Please sign in to comment.