Skip to content

Commit

Permalink
feat(cb2-10603): attempt to decode SQS
Browse files Browse the repository at this point in the history
  • Loading branch information
naathanbrown committed Mar 27, 2024
1 parent f1ae5cd commit fb343f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/functions/reportGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ const reportGen: Handler = async (event: any, context?: Context, callback?: Call
};

const processRecord = (record: any) => {
const recordBody = JSON.parse(record.body ?? '');
const recordBody = JSON.parse(record.body ?? "");
if (
recordBody.eventName === 'MODIFY'
recordBody.eventName === "MODIFY"
&& recordBody.dynamodb
&& recordBody.dynamodb.NewImage
) {
return DynamoDB.Converter.unmarshall(recordBody.dynamodb.NewImage);
}
return undefined;
}
};

export { reportGen };

0 comments on commit fb343f7

Please sign in to comment.