Skip to content

Commit

Permalink
geoquery parameters camelCased
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 12, 2023
1 parent ff46b3f commit c85c6c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ inhabitants (\~22750 cities), through either:
- optional e.g. `?city=heidelberg&ISO3166alpha2=ZA`
* by `id`
- this uses the `city::country` "id" value, e.g. `lecce::italy`
* by `geolatitude` & `geolongitude` & `geodistance`
- `geodistance` is to be given in meters
* by `geoLatitude` & `geoLongitude` & `geoDistance`
- `geoDistance` is to be given in meters

#### Response options

Expand Down
6 changes: 3 additions & 3 deletions src/hooks/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export function validateBeaconQuery(queryData) {
export function mkGeoParams(geoCity, geodistanceKm) {
if (!geoCity) return null
const coordinates = geoCity.data.geoLocation.geometry.coordinates ?? []
const [geolongitude, geolatitude] = coordinates
const geodistance = geodistanceKm ? geodistanceKm * 1000 : 100 * 1000
return { geolongitude, geolatitude, geodistance }
const [geoLongitude, geoLatitude] = coordinates
const geoDistance = geodistanceKm ? geodistanceKm * 1000 : 100 * 1000
return { geoLongitude, geoLatitude, geoDistance }
}

export function mkGeneParams(gene) {
Expand Down

0 comments on commit c85c6c0

Please sign in to comment.