diff --git a/lambda/readPass/index.js b/lambda/readPass/index.js index 8d352e26..10932ba1 100644 --- a/lambda/readPass/index.js +++ b/lambda/readPass/index.js @@ -170,7 +170,8 @@ exports.handler = async (event, context) => { const dateOptions = { day: 'numeric', month: 'long', year: 'numeric' }; let formattedDate = new Date(passData.data[0].date).toLocaleDateString('en-US', dateOptions); if (passData.data[0].type) { - formattedDate += ' (' + passData.data[0].type + ')' + let formattedType = passData.data[0].type === 'DAY' ? 'ALL DAY' : passData.data[0].type; + formattedDate += ' (' + formattedType + ')' } let personalisation = { diff --git a/lambda/writePass/index.js b/lambda/writePass/index.js index 0ec3fe7c..4feff309 100644 --- a/lambda/writePass/index.js +++ b/lambda/writePass/index.js @@ -171,7 +171,11 @@ exports.handler = async (event, context) => { '&email=' + email + '&park=' + - parkName; + parkName + + '&date=' + + dateselector + + '&type=' + + type; const encodedCancellationLink = encodeURI(cancellationLink); @@ -196,7 +200,7 @@ exports.handler = async (event, context) => { firstName: firstName, lastName: lastName, date: formattedDate, - type: type, + type: type === 'DAY' ? 'ALL DAY' : type, facilityName: facilityName, numberOfGuests: numberOfGuests.toString(), registrationNumber: registrationNumber.toString(),