Browse Source

Merge branch 'production' of github.com:pelias/api into ngram-address-parser

pull/169/head
Harish Krishna 9 years ago
parent
commit
06e8078c8e
  1. 25
      app.js
  2. 2
      package.json
  3. 6
      test/ciao/suggest/nearby_nobias.coffee

25
app.js

@ -37,28 +37,17 @@ app.get( '/', controllers.index() );
// doc API
app.get( '/doc', sanitisers.doc.middleware, controllers.doc() );
// suggest API
// app.get( '/suggest', sanitisers.suggest.middleware, controllers.suggest() );
// app.get( '/suggest/nearby',
// sanitisers.suggest.middleware,
// controllers.suggest(undefined, undefined, require('./helper/queryMixer').suggest_nearby) );
// app.get( '/suggest/coarse',
// sanitisers.coarse.middleware,
// controllers.suggest(undefined, undefined, require('./helper/queryMixer').coarse) );
// search API
app.get( '/search', sanitisers.search.middleware, controllers.search() );
// suggest APIs
app.get( '/suggest', sanitisers.search.middleware, controllers.search() );
app.get( '/suggest/nearby', sanitisers.search.middleware, controllers.search() );
// @todo: /suggest/nearby should enforce lat/lon required, check other endpoints for validation
// reverse API
app.get( '/reverse', sanitisers.reverse.middleware, controllers.search(undefined, require('./query/reverse')) );
app.get( '/suggest/nearby', sanitisers.suggest.middleware, controllers.search() );
app.get( '/suggest/coarse', sanitisers.coarse.middleware, controllers.search() );
// coarse API
// search APIs
app.get( '/search', sanitisers.search.middleware, controllers.search() );
app.get( '/search/coarse', sanitisers.coarse.middleware, controllers.search() );
app.get( '/suggest/coarse', sanitisers.coarse.middleware, controllers.search() );
// reverse API
app.get( '/reverse', sanitisers.reverse.middleware, controllers.search(undefined, require('./query/reverse')) );
/** ----------------------- error middleware ----------------------- **/

2
package.json

@ -1,7 +1,7 @@
{
"name": "pelias-api",
"author": "mapzen",
"version": "1.2.1",
"version": "2.0.0",
"description": "Pelias API",
"homepage": "https://github.com/pelias/api",
"license": "MIT",

6
test/ciao/suggest/nearby_nobias.coffee

@ -0,0 +1,6 @@
#> suggest without geo bias
path: '/suggest/nearby?input=a'
#? 400 bad request
response.statusCode.should.equal 400
Loading…
Cancel
Save