Skip to content

Commit df12071

Browse files
committed
Fix detail.
1 parent e44dc70 commit df12071

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/utils/batch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ export const batchWithSize = ({
7878
if (claimCheckBucketName) {
7979
// setup claim check
8080
x[putClaimcheckRequest] = toPutClaimcheckRequest(JSON.parse(x[opt.requestEntryField].Detail), claimCheckBucketName);
81-
x[opt.requestEntryField] = toClaimcheckEvent(
81+
x[opt.requestEntryField].Detail = JSON.stringify(toClaimcheckEvent(
8282
JSON.parse(x[opt.requestEntryField].Detail),
8383
claimCheckBucketName,
84-
);
84+
));
8585
size = Buffer.byteLength(JSON.stringify(x[opt.requestEntryField]));
8686
} else {
8787
const error = new Error(`Request size: ${size}, exceeded max: ${opt.maxRequestSize}`);

test/unit/sinks/claimcheck.test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,7 @@ describe('sinks/claimcheck.js', () => {
5858
expect(collected[1]).to.deep.equal([
5959
{
6060
publishRequestEntry: { // size = 39
61-
id: '3',
62-
type: undefined,
63-
partitionKey: undefined,
64-
timestamp: undefined,
65-
tags: undefined,
66-
s3: {
67-
bucket: 'event-lake-s3',
68-
key: 'us-west-2/claimchecks/2024/8/20/17/3',
69-
},
61+
Detail: '{"id":"3","s3":{"bucket":"event-lake-s3","key":"us-west-2/claimchecks/2024/8/20/17/3"}}',
7062
},
7163
putClaimcheckRequest: {
7264
Bucket: 'event-lake-s3',

0 commit comments

Comments
 (0)