Browse Source

exporting middleware and fixing reverse endpoint

pull/5/head
Harish Krishna 10 years ago
parent
commit
8fcfa1b57e
  1. 2
      app.js
  2. 3
      middleware/search.js

2
app.js

@ -35,7 +35,7 @@ app.get( '/suggest', sanitisers.sanitiser.middleware, controllers.suggest() );
app.get( '/search', sanitisers.sanitiser.middleware, middlewares.search.middleware, controllers.search() ); app.get( '/search', sanitisers.sanitiser.middleware, middlewares.search.middleware, controllers.search() );
// reverse API // reverse API
app.get( '/reverse', sanitisers.sanitiser.middleware, controllers.search(undefined, require('../query/reverse')) ); app.get( '/reverse', sanitisers.sanitiser.middleware, controllers.search(undefined, require('query/reverse')) );
/** ----------------------- error middleware ----------------------- **/ /** ----------------------- error middleware ----------------------- **/

3
middleware/search.js

@ -61,4 +61,5 @@ function middleware(req, res, next){
next(); next();
} }
module.exports = middleware; // middleware
module.exports.middleware = middleware
Loading…
Cancel
Save