diff --git a/app.js b/app.js index cacc3a82..c9694900 100644 --- a/app.js +++ b/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() ); // 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 ----------------------- **/ diff --git a/middleware/search.js b/middleware/search.js index d22b3414..b5496957 100644 --- a/middleware/search.js +++ b/middleware/search.js @@ -61,4 +61,5 @@ function middleware(req, res, next){ next(); } -module.exports = middleware; \ No newline at end of file +// middleware +module.exports.middleware = middleware \ No newline at end of file