feat: WEB-210 Fallback booking URL if encryption fails
This commit is contained in:
@@ -116,12 +116,19 @@ const updateStaysBookingUrl = async (
|
||||
stay.attributes.confirmationNumber.toString() +
|
||||
"," +
|
||||
apiJson.data.attributes.lastName
|
||||
let encryptedBookingValue = encryptValue(originalString)
|
||||
const encryptedBookingValue = encryptValue(originalString)
|
||||
const bookingUrl = !!encryptedBookingValue
|
||||
? fullBookingUrl + "?RefId=" + encryptedBookingValue
|
||||
: fullBookingUrl +
|
||||
"?lastName=" +
|
||||
apiJson.data.attributes.lastName +
|
||||
"&bookingId=" +
|
||||
stay.attributes.confirmationNumber
|
||||
return {
|
||||
...stay,
|
||||
attributes: {
|
||||
...stay.attributes,
|
||||
bookingUrl: fullBookingUrl + "?RefId=" + encryptedBookingValue,
|
||||
bookingUrl: bookingUrl,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user