Skip to content

Commit

Permalink
TRS-12
Browse files Browse the repository at this point in the history
- Fix after review
  • Loading branch information
birkirkristmunds committed May 13, 2024
1 parent 501e0de commit 5ab02bc
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,10 @@ export class IcelandicTransportAuthorityServices {
let fullUrl = restURL

if (queryParams) {
// Convert the query parameters to a query string
const queryString = Object.entries(queryParams)
.map(
([key, value]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(value)}`,
)
.join('&')
const searchParams = new URLSearchParams(queryParams)

// Concatenate the URL with the query string
fullUrl = `${restURL}?${queryString}`
fullUrl = `${restURL}?${searchParams.toString()}`
}

const headers = {
Expand Down

0 comments on commit 5ab02bc

Please sign in to comment.