Skip to content

Commit

Permalink
BRS-620: Remove License Plate field from DUP (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
marklise authored May 20, 2022
1 parent 10e381f commit 00c9c41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 1 addition & 2 deletions __tests__/global/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ module.exports = async () => {
'numberOfGuests',
'passStatus',
'phoneNumber',
'facilityType',
'license'
'facilityType'
]
},
ProvisionedThroughput: {
Expand Down
10 changes: 1 addition & 9 deletions __tests__/writePass.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ describe('Pass Fails', () => {
type: '',
numberOfGuests: '',
phoneNumber: '',
facilityType: '',
license: ''
facilityType: ''
// Missing JWT
})
};
Expand Down Expand Up @@ -79,7 +78,6 @@ describe('Pass Fails', () => {
numberOfGuests: '',
phoneNumber: '',
facilityType: '',
license: '',
captchaJwt: 'This is an invalid JWT'
})
};
Expand Down Expand Up @@ -111,7 +109,6 @@ describe('Pass Fails', () => {
numberOfGuests: 5, // Too many
phoneNumber: '',
facilityType: 'Trail',
license: '',
captchaJwt: token
})
};
Expand Down Expand Up @@ -140,7 +137,6 @@ describe('Pass Fails', () => {
numberOfGuests: 1,
phoneNumber: '',
facilityType: '',
license: '',
captchaJwt: token
})
};
Expand Down Expand Up @@ -172,7 +168,6 @@ describe('Pass Fails', () => {
numberOfGuests: 1,
phoneNumber: '',
facilityType: '',
license: '',
captchaJwt: token
})
};
Expand Down Expand Up @@ -204,7 +199,6 @@ describe('Pass Fails', () => {
numberOfGuests: 1,
phoneNumber: '',
facilityType: '',
license: '',
captchaJwt: token
})
};
Expand Down Expand Up @@ -246,7 +240,6 @@ describe('Pass Successes', () => {
numberOfGuests: 1,
phoneNumber: '2505555555',
facilityType: 'Trail',
license: 'abc123',
captchaJwt: token
})
};
Expand Down Expand Up @@ -284,7 +277,6 @@ describe('Pass Successes', () => {
phoneNumber: '2505555555',
facilityType: 'Parking',
mapLink: 'http://maps.google.com',
license: 'abc123',
captchaJwt: token
})
};
Expand Down
5 changes: 1 addition & 4 deletions lambda/writePass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ exports.handler = async (event, context) => {
numberOfGuests,
phoneNumber,
facilityType,
license,
captchaJwt,
...otherProps
} = newObject;
Expand Down Expand Up @@ -205,11 +204,9 @@ exports.handler = async (event, context) => {
mapLink: parkData[0].mapLink
};

// Mandatory if parking.
// Parking.
if (facilityType === 'Parking') {
passObject.Item['license'] = { S: license };
gcNotifyTemplate = process.env.GC_NOTIFY_PARKING_RECEIPT_TEMPLATE_ID;
personalisation['license'] = license;
}

if (parkData[0].visible === true) {
Expand Down

0 comments on commit 00c9c41

Please sign in to comment.