Skip to content

Commit

Permalink
changed back the string check for event.body
Browse files Browse the repository at this point in the history
  • Loading branch information
andieswift committed Jan 24, 2025
1 parent 2727577 commit d199239
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lambda/update/submitNOSO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export const handler = async (event: APIGatewayEvent) => {
}

try {
const item = submitNOSOAdminSchema.parse(JSON.parse(event.body));
const item = submitNOSOAdminSchema.parse(
typeof event.body === "string" ? JSON.parse(event.body) : event.body,
);

const { stateStatus, cmsStatus } = getStatus(item.status);
// check if it already exsists
Expand Down

0 comments on commit d199239

Please sign in to comment.