Skip to content

Commit a1f0221

Browse files
fix: reverts changes in batch API headers name (#615)
1 parent d3136ee commit a1f0221

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/batch/batch.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('Batch', () => {
319319
const request = lastCall[1];
320320
expect(request).toBeDefined();
321321
const headers = new Headers(request?.headers);
322-
expect(headers.get('x-resend-batch-validation')).toBe('permissive');
322+
expect(headers.get('x-batch-validation')).toBe('permissive');
323323

324324
expect(result.data).toEqual({
325325
data: [],

src/batch/batch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Batch {
5151
{
5252
...options,
5353
headers: {
54-
'x-resend-batch-validation': options?.batchValidation ?? 'strict',
54+
'x-batch-validation': options?.batchValidation ?? 'strict',
5555
...options?.headers,
5656
},
5757
},

src/batch/interfaces/create-batch-options.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export type CreateBatchSuccessResponse<
2424
} & (Options['batchValidation'] extends 'permissive'
2525
? {
2626
/**
27-
* Only present when header "x-resend-batch-validation" is set to 'permissive'.
27+
* Only present when header "x-batch-validation" is set to 'permissive'.
2828
*/
2929
errors: {
3030
/**

0 commit comments

Comments
 (0)