Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: allow any JSON object to be saved in blob store #901

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

EvanHahn
Copy link
Contributor

The blob store will need to store additional metadata, such as audio duration, in the future. This changes its metadata type to any JSON object to allow this.

It also adds a test for blobStore.entry() to ensure metadata is saved.

This change shouldn't affect the external API because the blob store is not directly exposed. It's used internally by BlobApi, which did not change.

The blob store will need to store additional metadata, such as audio
duration, in the future. This changes its `metadata` type to any JSON
object to allow this.

It also adds a test for `blobStore.entry()` to ensure metadata is saved.

This change shouldn't affect the external API because the blob store is
not directly exposed. It's used internally by `BlobApi`, which did not
change.
Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of changes which would be good to include:

  • Also change type for put() method
  • Override the return of entry() to make Entry.metadata: JsonObject rather than the current looser object.

@EvanHahn EvanHahn force-pushed the allow-any-json-object-to-be-saved-in-blobstore branch from 8a6390f to 58dab5b Compare October 23, 2024 14:36
@EvanHahn
Copy link
Contributor Author

Made put use JSON in efdce77, and improved the return type in 58dab5b.

@EvanHahn EvanHahn merged commit 7dbed14 into main Oct 23, 2024
6 checks passed
@EvanHahn EvanHahn deleted the allow-any-json-object-to-be-saved-in-blobstore branch October 23, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants