@@ -146,16 +146,16 @@ async function createRegistration(registrationStatus, data, id, eventID, createN
146146
147147async function sendEmail ( id , eventName , registrationStatus ) {
148148 return new Promise ( async ( resolve , reject ) => {
149- if ( registrationStatus !== "checkedIn" ) {
150- const userParams = {
151- Key : { id : id } ,
152- TableName : 'biztechUsers' + process . env . ENVIRONMENT
153- }
154- await docClient . get ( userParams ) . promise ( )
155- . then ( async ( user ) => {
156- if ( user . Item == null ) {
157- reject ( 'user' )
158- } else {
149+ const userParams = {
150+ Key : { id : id } ,
151+ TableName : 'biztechUsers' + process . env . ENVIRONMENT
152+ }
153+ await docClient . get ( userParams ) . promise ( )
154+ . then ( async ( user ) => {
155+ if ( user . Item == null ) {
156+ reject ( ' user' )
157+ } else {
158+ if ( registrationStatus !== "checkedIn" ) {
159159 const userEmail = user . Item . email ;
160160 const userName = user . Item . fname ;
161161
@@ -181,10 +181,10 @@ async function sendEmail(id, eventName, registrationStatus) {
181181 }
182182 }
183183 await email . send ( msg ) ;
184- resolve ( )
185184 }
186- } )
187- }
185+ resolve ( )
186+ }
187+ } )
188188 } )
189189
190190}
@@ -224,7 +224,7 @@ module.exports.get = async (event, ctx, callback) => {
224224 if ( queryString . hasOwnProperty ( 'afterTimestamp' ) ) {
225225 timeStampFilter = Number ( queryString . afterTimestamp ) ;
226226 const d = new Date ( timeStampFilter ) ;
227- console . log ( 'Get registration on and after ' , d . getHours ( ) + ':' + d . getMinutes ( ) + '/' + d . getDate ( ) + '/' + ( d . getMonth ( ) + 1 ) + '/' + d . getFullYear ( ) ) ;
227+ console . log ( 'Get registration on and after ' , d . getHours ( ) + ':' + d . getMinutes ( ) + '/' + d . getDate ( ) + '/' + ( d . getMonth ( ) + 1 ) + '/' + d . getFullYear ( ) ) ;
228228 }
229229 if ( queryString . hasOwnProperty ( 'eventID' ) ) {
230230 const eventID = queryString . eventID ;
0 commit comments