Julian Simioni
18de9a6766
Replace giant switch-statement test with multiple tests
9 years ago
Julian Simioni
03387722fb
Move _ids sanitiser tests to separate file
9 years ago
Julian Simioni
5721841fb3
Clarify name and error message in ids test
9 years ago
Julian Simioni
1b6c61c92e
Leave clean.ids undefined on error
9 years ago
Julian Simioni
65b7db94d6
Fix typo
9 years ago
Julian Simioni
cd63209085
Error on multiple ids parameters instead of warning
9 years ago
Julian Simioni
c687102374
Rename /place id parameter to ids
9 years ago
Julian Simioni
8592c37bf6
Expect multiple ids to be specified as a comma-delimited string
...
Disallow the other way that Node.js allows, which is to list the id
parameter multiple times in the querystring. See #272 .
9 years ago
Julian Simioni
47701277a3
Rename test with duplicate, non descriptive name
9 years ago
Julian Simioni
2cc9107114
Add test for multiple ids
9 years ago
Julian Simioni
bd4fbfe3bd
Whitespace
9 years ago
Peter Johnson
82ab899ecc
progress commit
9 years ago
Diana Shkolnikov
537effa8bf
Fix distance calculation to use 'point.lat' instead of 'lat'
9 years ago
Diana Shkolnikov
f63533dd9c
Switch to res.data instead of req.results.data
9 years ago
Julian Simioni
f3acf3b308
Check for numeric value of lat/lon to avoid null island bug
...
Using the check-types module, check that lat/lon values are numbers,
instead of checking their truthyness, to ensure that queries for null
island work correctly.
9 years ago
Julian Simioni
dd9654657e
Use flat clean structure in query/autocomplete.js
9 years ago
Julian Simioni
109c28a588
Use flat point.{lat|lon} in query/reverse.js
9 years ago
Julian Simioni
190304b039
Use flat structure for focus.point.{lat|lon} in query/search.js
9 years ago
Julian Simioni
d6abe09447
Use flat clean structure in /reverse
9 years ago
Julian Simioni
97044f655b
Flatten structure of clean for /search focus.point.lat|lon
9 years ago
Julian Simioni
4260442f59
Change boundary.circle params to flat string structure
9 years ago
Julian Simioni
e5ed04858b
Test individual clean attribute intead of using deepEquals
9 years ago
Julian Simioni
1bfa2fde40
Remove empty test of invalid lats
9 years ago
Julian Simioni
a5ba251afe
Remove brittle test fixture from search sanitiser
...
Some of the tests were checking the entire clean object, when they only
cared about one tiny element. This made making changes really hard.
9 years ago
Julian Simioni
66e1cab007
Whitespace
9 years ago
Stephen Hess
d270ba71cb
added negative tests for req w/o results and req.results w/o data
9 years ago
Stephen Hess
5849477929
adjusted 'exact' confidence to be within 1 meter
9 years ago
Stephen Hess
0b5172a452
initial stab at confidence score calculation based on distance from point.lat and point.lon
9 years ago
Diana Shkolnikov
f1fdc2bc26
Remove categories from response json
9 years ago
Diana Shkolnikov
0348f36671
Remove warning when no size param specified
...
Added tests for _size sanitizer while in there.
9 years ago
Peter Johnson
7c46aed4a7
expose error messages in geojson
9 years ago
Peter Johnson
6ab81ffca5
set response data/meta on instead of
9 years ago
Stephen Hess
6c85e5892e
converted warnings to errors
9 years ago
Julian Simioni
4e74c4db86
Add autocomplete sanitiser
...
This is similar to the search sanitiser but with a more limited scope.
It doesn't support layers, sorces, or bounding boxes.
9 years ago
Stephen Hess
ba22912507
implemented Diana's suggestions to use check-types and delete key rather than set to undefined
9 years ago
Stephen Hess
13635a2c16
added boundary.country to search and reverse queries (with test fixtures)
9 years ago
Julian Simioni
509a6a7401
Remove geocoding block from properties in GeoJSON responses
...
All the attributes that were in this block are now put directly in the
GeoJSON properties object
9 years ago
Stephen Hess
a4c43ee482
added fixture for boundary.country in query building
9 years ago
Stephen Hess
78c335d072
modified sanitizer to read from flattened parameter structure
9 years ago
Stephen Hess
d07a501682
requirements updates
...
set boundary country to iso3 instead of iso2
set to undefined if boundary.country input is not a string
9 years ago
Stephen Hess
66bf2bb46b
added sanitizer for boundary country parameter
...
sets to undefined if input country not found as ISO2/3
9 years ago
Peter Johnson
a1efb0c6d0
lodash-ify some array functions; remove 'yes' and 'y' from thruthy
9 years ago
Peter Johnson
e726636c3d
merge with master
9 years ago
Peter Johnson
bf42290c7c
refactor sanitizers: first pass
9 years ago
Diana Shkolnikov
c069933d5b
Refactored layers and sources into a common targets module
9 years ago
Diana Shkolnikov
67e034f5f2
Rename `source` to `sources`
...
... with a dash of refactoring thrown in for good measure
9 years ago
Diana Shkolnikov
dd78f324ee
Compute distance for each result of reverse query
9 years ago
Diana Shkolnikov
feb1b0a6cd
Update /reverse endpoint params and query as per API spec
9 years ago
Stephen Hess
a2b1579b3e
incorporated _private sanitizer into search endpoint
9 years ago
Stephen Hess
c19d56697e
add _private sanitizer
9 years ago