Skip to content

Commit

Permalink
fixed variable name mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
andieswift committed Jan 22, 2025
1 parent cede84c commit 63434be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lambda/adminActions/adminSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const submitNOSOAdminSchema = z
.object({
id: z.string(),
adminChangeType: z.literal("NOSO"),
copyAttachmentsFrom: z.string().optional(),
copyAttachmentsFromId: z.string().optional(),
})
.and(z.record(z.string(), z.any()));

Expand Down
2 changes: 1 addition & 1 deletion lib/lambda/adminActions/submitNOSO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ItemResult } from "shared-types/opensearch/main";
import { submitNOSOAdminSchema } from "./adminSchemas";

export const copyAttachments = async (data: any) => {
console.log("ANDIE******:", data);
console.log("ANDIE******:", data, data.copyAttachmentsFromId);
//ANDIE: change type not any
// change any
if (!data.copyAttachmentsFromId) return data;
Expand Down
3 changes: 2 additions & 1 deletion lib/lambda/sinkChangelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ const processAndIndex = async ({
packageId: result.data.id,
});
});
} else if (result.data.adminChangeType === "NOSO" && result.data.copyAttachmentsFrom) {
} else if (result.data.adminChangeType === "NOSO" && result.data.copyAttachmentsFromId) {
console.log("attempting to copy attachments...");
try {
const data = await copyAttachments(result.data);
docs.push(data);
Expand Down

0 comments on commit 63434be

Please sign in to comment.