Skip to content

Commit

Permalink
fix schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanyvu committed Nov 26, 2024
1 parent a981b4a commit 839f218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lambda/sinkChangelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ const processAndIndex = async ({
deleted: z.boolean(),
});

deletedPackageSchema.transform((schema) => ({
const transformedData = deletedPackageSchema.transform((schema) => ({
...schema,
event: "soft-delete",
packageId: schema.id,
id: `${schema.id}-${offset}`,
}));

const result = deletedPackageSchema.safeParse(record);
const result = transformedData.safeParse(record);

if (result.success) {
docs.push(result.data);
Expand Down

0 comments on commit 839f218

Please sign in to comment.