Skip to content

Commit

Permalink
fix: add JSON.stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
asharonbaltazar committed Dec 8, 2024
1 parent 7a02c49 commit 8bd3057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lambda/sinkMainProcessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, number>>((map, item) => {
Expand Down Expand Up @@ -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 });

Expand Down

0 comments on commit 8bd3057

Please sign in to comment.