feat: WEB-210 Fallback booking URL if encryption fails

This commit is contained in:
Hrishikesh Vaipurkar
2024-07-08 16:37:36 +02:00
parent eb4cfcce3a
commit 88a7f57349
2 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ import crypto from "crypto"
import { env } from "@/env/server"
export default function encryptValue(originalString: string) {
let result = ""
let result: String = ""
try {
const encryptionKey = env.BOOKING_ENCRYPTION_KEY
const bufferKey = Buffer.from(encryptionKey, "utf8")
@@ -20,5 +20,5 @@ export default function encryptValue(originalString: string) {
} catch (e) {
console.log(e)
}
return result.toString()
return result
}