sign & reject

This commit is contained in:
Ivan Socolsky 2015-02-13 18:03:55 -03:00
parent 8df3b18848
commit ee38b5ee85
1 changed files with 20 additions and 0 deletions

20
app.js
View File

@ -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();