From ee38b5ee85e4c41a08731fd055429cc369009780 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 13 Feb 2015 18:03:55 -0300 Subject: [PATCH] sign & reject --- app.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app.js b/app.js index 6813fec..2ece691 100644 --- a/app.js +++ b/app.js @@ -181,6 +181,26 @@ router.get('/v1/balance/', function(req, res) { }); }); +router.post('/v1/txproposals/:id/signatures', function(req, res) { + req.body.txProposalId = req.params['id']; + getServerWithAuth(req, res, function(server) { + server.signTx(req.body, function(err, txp) { + if (err) return returnError(err, res, req); + res.end(); + }); + }); +}); + +router.post('/v1/txproposals/:id/rejections', function(req, res) { + req.body.txProposalId = req.params['id']; + getServerWithAuth(req, res, function(server) { + server.signTx(req.body, function(err, txp) { + if (err) return returnError(err, res, req); + res.end(); + }); + }); +}); + // TODO: DEBUG only! router.get('/v1/dump', function(req, res) { var server = CopayServer.getInstance();