From 8bd305702dc93fc086344d212fc6f404453d1d64 Mon Sep 17 00:00:00 2001 From: Asharon Baltazar Date: Sun, 8 Dec 2024 12:20:42 -0500 Subject: [PATCH] fix: add JSON.stringify --- lib/lambda/sinkMainProcessors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lambda/sinkMainProcessors.ts b/lib/lambda/sinkMainProcessors.ts index 07ffafdf42..afafd48971 100644 --- a/lib/lambda/sinkMainProcessors.ts +++ b/lib/lambda/sinkMainProcessors.ts @@ -97,7 +97,7 @@ export const insertOneMacRecordsFromKafkaIntoMako = async ( }; const getMakoDocTimestamps = async (kafkaRecords: KafkaRecord[]) => { - const kafkaIds = kafkaRecords.map((record) => decodeBase64WithUtf8(record.key)); + const kafkaIds = kafkaRecords.map((record) => JSON.stringify(decodeBase64WithUtf8(record.key))); const openSearchRecords = await getItems(kafkaIds); return openSearchRecords.reduce>((map, item) => { @@ -129,7 +129,7 @@ export const insertNewSeatoolRecordsFromKafkaIntoMako = async ( return collection; } - const id: string = decodeBase64WithUtf8(key); + const id: string = JSON.stringify(decodeBase64WithUtf8(key)); console.log({ splitId: id.split(""), makoDocTimestamps });