From 19f5e4b0112cb87d536734fc86f584db4f6e7f8b Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 2 Apr 2015 11:28:16 -0300 Subject: [PATCH] add rest method --- lib/expressapp.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/expressapp.js b/lib/expressapp.js index bb73d52..d276034 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -284,6 +284,16 @@ ExpressApp.start = function(opts) { }); }); + router.post('/v1/addresses/scan/', function(req, res) { + getServerWithAuth(req, res, function(server) { + server.startScan(req.body, function(err) { + if (err) return returnError(err, res, req); + res.end(); + }); + }); + }); + + app.use(opts.basePath || '/bws/api', router); return app; };