Skip to content

Commit

Permalink
Not including detail id in wrangler output (#6671)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoe-cf committed Sep 12, 2024
1 parent 1986492 commit 48eeff4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-bananas-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: Update R2 Create Event Notification response
7 changes: 3 additions & 4 deletions packages/wrangler/src/r2/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ export async function getEventNotificationConfig(

/** Construct & transmit notification configuration to EWC.
*
* On success, receive HTTP 200 response with a body like:
* { event_notification_detail_id: string }
* On success, receive HTTP 200 response with no body
*
* Possible status codes on failure:
* - 400 Bad Request - Either:
Expand All @@ -541,7 +540,7 @@ export async function putEventNotificationConfig(
eventTypes: R2EventType[],
prefix?: string,
suffix?: string
): Promise<{ event_notification_detail_id: string }> {
): Promise<void> {
const queue = await getQueue(config, queueName);
const headers = eventNotificationHeaders(apiCredentials);
let actions: R2EventableOperation[] = [];
Expand All @@ -561,7 +560,7 @@ export async function putEventNotificationConfig(
" and "
)} (${actions.join(",")})`
);
return await fetchResult<{ event_notification_detail_id: string }>(
return await fetchResult<void>(
`/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`,
{ method: "PUT", body: JSON.stringify(body), headers }
);
Expand Down

0 comments on commit 48eeff4

Please sign in to comment.