@@ -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 }
0 commit comments