Skip to content

Commit d48e8c6

Browse files
Merge branch 'master' into snyk-upgrade-3745200163f7332f70ca354f01cc8fa8
2 parents f96400d + 0eb11e4 commit d48e8c6

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
5959
<td align="center"><a href="https://github.com/mpiroc"><img src="https://avatars2.githubusercontent.com/u/1623344?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Pirocchi</b></sub></a><br /><a href="#infra-mpiroc" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
6060
<td align="center"><a href="https://bellese.io/"><img src="https://avatars3.githubusercontent.com/u/61873300?v=4" width="100px;" alt=""/><br /><sub><b>Michael Schechter</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=mschechter-bellese" title="Code">💻</a></td>
6161
<td align="center"><a href="http://ianjadams.com"><img src="https://avatars1.githubusercontent.com/u/7966226?v=4" width="100px;" alt=""/><br /><sub><b>Ian Adams</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=ijadams" title="Code">💻</a></td>
62+
<td align="center"><a href="https://www.joshglazer.com"><img src="https://avatars1.githubusercontent.com/u/5789311?v=4" width="100px;" alt=""/><br /><sub><b>Josh Glazer</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=joshglazer" title="Code">💻</a></td>
6263
</tr>
6364
</table>
6465

docs/QuickStart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ JWT_KEY= # Custom value
2626

2727
## Step 4 - Run Development Stack
2828

29-
To run the application run `docker-compose up -d`.
29+
To run the application run `docker-compose up -d --build`.
3030

3131
## Step 5 - Confirm Success
3232

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"homepage": "https://github.com/CodeForBaltimore/Bmore-Responsive#readme",
3434
"dependencies": {
3535
"@babel/core": "7.12.3",
36-
"@babel/node": "7.12.1",
36+
"@babel/node": "7.12.6",
3737
"casbin": "4.7.2",
3838
"casbin-sequelize-adapter": "2.1.0",
3939
"chai": "4.2.0",

src/email/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,18 @@ const sendForgotPassword = async (userEmail, resetPasswordToken) => {
5555
}
5656
}
5757

58-
const sendContactCheckInEmail = async (info) => {
58+
const sendContactCheckInEmail = async (info, origin) => {
59+
const url = origin ? origin : process.env.VUE_APP_URL
5960
try {
60-
const entityLink = `${process.env.URL}/checkin/${info.entityId}?token=${info.token}`
61+
const entityLink = `${url}/checkin/${info.entityId}?token=${info.token}`
6162
const emailTitle = `${info.entityName} Healthcare Rollcall Check In`
6263
const emailContents = `Hello ${info.name}! It is time to update the status of ${info.entityName}. Please click the link below to check in.`
6364
const template = (info.entityType === 'Assisted Living Facility') ? 'assisted_living_checkin' : 'contact_check_in'
6465
await sendMail(
6566
info.email,
6667
emailTitle,
67-
nunjucks.render(`${template}_html.njk`, { emailTitle, emailContents, entityLink }),
68-
nunjucks.render(`${template}_text.njk`, { emailTitle, emailContents, entityLink })
68+
nunjucks.render(`${template}_html.njk`, {emailTitle, emailContents, entityLink}),
69+
nunjucks.render(`${template}_text.njk`, {emailTitle, emailContents, entityLink})
6970
)
7071

7172
return true
@@ -74,4 +75,4 @@ const sendContactCheckInEmail = async (info) => {
7475
}
7576
}
7677

77-
export default {sendForgotPassword, sendContactCheckInEmail}
78+
export default {sendForgotPassword, sendContactCheckInEmail, sendMail}

src/routes/contact.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ router.post('/send', async (req, res) => {
212212
}
213213

214214
emails.forEach(async (e) => {
215-
email.sendContactCheckInEmail(e)
215+
email.sendContactCheckInEmail(e, req.headers.origin)
216216
})
217217

218218
const uniqueEntities = [...new Set(emails.map(email => email.entityId))]
@@ -239,6 +239,7 @@ router.post('/send/:type/:id', async (req, res) => {
239239

240240
try {
241241
let entity
242+
242243
if (req.params.type.toLowerCase() === 'entity') {
243244
entity = await models.Entity.findById(req.params.id)
244245
} else if (req.params.type.toLowerCase() === 'contact') {
@@ -261,7 +262,7 @@ router.post('/send/:type/:id', async (req, res) => {
261262
entityId: entity.id,
262263
token: temporaryToken
263264
}
264-
email.sendContactCheckInEmail(e).then(() => {
265+
email.sendContactCheckInEmail(e, req.headers.origin).then(() => {
265266
response.setMessage(`${entity.name} emailed sent.`)
266267
response.setCode(200)
267268
}, err => {

0 commit comments

Comments
 (0)