Julian Simioni
3101aad399
Simplify ids sanitizing logic
9 years ago
Julian Simioni
1b6c61c92e
Leave clean.ids undefined on error
9 years ago
Julian Simioni
1b512fc643
Remove empty array check that will always fail
...
Even splitting on an empty string returns an array of one element
9 years ago
Julian Simioni
399e566551
Remove unnecessary calls to function
9 years ago
Julian Simioni
cd63209085
Error on multiple ids parameters instead of warning
9 years ago
Julian Simioni
2bfe8785e5
Rename sanitiser/_id.js to sanitiser/_ids.js
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
bd4fbfe3bd
Whitespace
9 years ago
Peter Johnson
82ab899ecc
progress commit
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
66e1cab007
Whitespace
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
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
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
18033535c1
delete deprecated
9 years ago
Peter Johnson
e726636c3d
merge with master
9 years ago
Peter Johnson
10242a8682
rename unclean->raw
9 years ago
Peter Johnson
e532c2a88a
improved error checking
9 years ago
Peter Johnson
052904e2e5
documentation typo
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
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
Stephen Hess
55e31af238
extract truthy sanitizer to own file
9 years ago
Stephen Hess
728fa8ac46
refactored _details sanitizer
...
removed redundant variable
swapped conditionals for readability
9 years ago
Stephen Hess
d2dc26f69f
whitespace
9 years ago
Julian Simioni
96c58e8658
Rename /reverse lat/lon to point.lat/lon
9 years ago
Julian Simioni
3176a61596
Rename /search lat/lon to focus.point.lat/lon
9 years ago
Julian Simioni
0d23792591
Split geo sanitiser into geo_reverse and geo_search
...
Common functions are moved to geo_common. This is required to allow
separate behavior for search and reverse.
9 years ago
Julian Simioni
fd3b12cfa9
Remove all references to non-existent zoom parameter
9 years ago
Julian Simioni
040871cbe4
Whitespace
9 years ago
Peter Johnson
22322eaa32
change param:input to param:text
9 years ago
Harish Krishna
86424b8bbe
Rename `/search?input`, replacing it with '/search?text' parameter instead
...
changing parameter name input to text
https://github.com/pelias/api/issues/172
Rebased by @orangejulius
9 years ago
Julian Simioni
ade4ce8b17
Add types middleware
...
This middleware looks at the list of types that will be sent to
Elasticsearch, if it's an empty array, it sends an error response before
Elasticsearch is even quieried, because Elasticsearch interprets an
empty type array as "search anything" rather than the intended "don't
search anything".
9 years ago
Julian Simioni
3383fa0321
Add source parameter sanitiser
9 years ago
Julian Simioni
2ebc935295
Rename query/indidces to query/types
...
It didn't really contain a list of indices.
9 years ago
Julian Simioni
6f92189519
Remove default_layers_set flag!
...
After refactoring, this flag is no longer needed, as all areas of the
code that care about layers do so by setting a key within clean.types,
and then the types helper intelligently combines those together later.
9 years ago