Skip to content

Commit

Permalink
change order of sinklog changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanyvu committed Nov 26, 2024
1 parent 21f1968 commit a981b4a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/lambda/sinkChangelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ const processAndIndex = async ({
// Parse the kafka record's value
const record = JSON.parse(decodeBase64WithUtf8(value));

// If we're not a mako event, continue
// TODO: handle legacy. for now, just continue
if (!record.event || record?.origin !== "mako") {
continue;
}

// If the event is a supported event, transform and push to docs array for indexing
console.log("event below");
console.log(record.event);

if (record.isAdminChange) {
const deletedPackageSchema = z.object({
id: z.string(),
Expand All @@ -107,6 +97,16 @@ const processAndIndex = async ({
}
}

// If we're not a mako event, continue
// TODO: handle legacy. for now, just continue
if (!record.event || record?.origin !== "mako") {
continue;
}

// If the event is a supported event, transform and push to docs array for indexing
console.log("event below");
console.log(record.event);

if (record.event in transforms) {
const transformForEvent = transforms[record.event as keyof typeof transforms];

Expand Down

0 comments on commit a981b4a

Please sign in to comment.