Skip to content

Commit

Permalink
minor fix to geocoding url
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinonen committed Oct 9, 2023
1 parent 8b52d72 commit f8f25ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/geocoding.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GeocodingResult } from '../types'

const baseUrl =
process.env.REACT_APP_DT_GEOCODING_URL || 'https://api.digitransit.fi/geocoding/v1/search?'
process.env.REACT_APP_DT_GEOCODING_URL || 'https://dev-api.digitransit.fi/geocoding/v1/search?'

const getParamString = (params: Record<string, any>): string => {
let str = ''
Expand Down Expand Up @@ -33,6 +33,7 @@ export const geocodeAddress = async (
size: resultCount,
lang: 'fi',
sources: 'oa,osm,nlsfi',
'digitransit-subscription-key': process.env.REACT_APP_DT_GEOCODING_KEY || '',
}
const uri = baseUrl + getParamString(params)
const response = await fetch(encodeURI(uri))
Expand Down

0 comments on commit f8f25ee

Please sign in to comment.