Skip to content

Commit

Permalink
fix tests for get stations by url
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandotv committed Aug 16, 2024
1 parent da5e2df commit 420bb6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/radioBrowser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ describe('Radio Browser', () => {
'user-agent': appName
}
})
.get(`/json/stations/byurl/${url}`)
.get(`/json/stations/byurl?url=${url}`)
.reply(200, mockResult)

const result = await api.getStationByUrl(url, {
Expand Down
7 changes: 6 additions & 1 deletion src/radioBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ export class RadioBrowserApi {
fetchConfig?: RequestInit
): Promise<Station[]> {
const stations = await this.runRequest<StationResponse[]>(
this.buildRequest(`stations/byurl?url=${url}`, undefined, undefined, false),
this.buildRequest(
`stations/byurl?url=${url}`,
undefined,
undefined,
false
),
fetchConfig
)

Expand Down

0 comments on commit 420bb6e

Please sign in to comment.