Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Add optional peaks key to AudioDetail interface #998

Merged
merged 2 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export interface AudioDetail extends BaseMediaDetail<'audio'> {
sample_rate?: number
alt_files?: any
filetype?: string
peaks?: any
Copy link
Contributor

Choose a reason for hiding this comment

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

We can actually set this to number[] specifically 🙂

Suggested change
peaks?: any
peaks?: number[]

It might also be always defined, in which case we could remove the ? but I'm not confident about that... and it's better safe than sorry when working with API responses anyway.

Copy link
Member

Choose a reason for hiding this comment

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

@ChrisCoastal just wanted to make sure you saw this review. Thanks for your contribution so far!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @sarayourfriend and @zackkrida and thank you for the feedback and welcome to Openverse! I am very thankful for the guidance and opportunity. Apologies, as I've just seen this followup now, so I will changes and submit. Thanks!

}

export interface ImageDetail extends BaseMediaDetail<'image'> {
Expand Down