Skip to content

Commit

Permalink
fix: Don't overwrite blobRequest event fields (#225)
Browse files Browse the repository at this point in the history
Also fix missing bucket reference for bucket references with permissions when adding notifications.
  • Loading branch information
tjholm committed Apr 11, 2024
1 parent e8243c6 commit 62d62c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/api/storage/v1/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class Bucket {
notificationPrefixFilter,
...middleware
);
return notification['start']();
return notification['start'](this);
}
}

Expand Down
7 changes: 0 additions & 7 deletions src/resources/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
ClientMessage,
RegistrationRequest,
ServerMessage,
BlobEvent,
BlobEventResponse,
} from '@nitric/proto/storage/v1/storage_pb';
import { StorageListenerClient } from '@nitric/proto/storage/v1/storage_grpc_pb';
Expand Down Expand Up @@ -138,12 +137,6 @@ export class BucketNotification {
responseMessage.setId(message.getId());

try {
blobEventRequest.setBucketName(this.options.bucket);
const blobEvent = new BlobEvent();
blobEvent.setKey(this.options.notificationPrefixFilter);
blobEvent.setType(this.options.notificationType);
blobEventRequest.setBlobEvent(blobEvent);

if (bucket) {
const ctx = BlobEventContext.fromRequest(
blobEventRequest,
Expand Down

0 comments on commit 62d62c7

Please sign in to comment.