Browse Source

add express endpoint for sending tx

activeAddress
Ivan Socolsky 9 years ago
parent
commit
0a5e144f93
  1. 11
      lib/expressapp.js

11
lib/expressapp.js

@ -369,6 +369,17 @@ ExpressApp.prototype.start = function(opts, cb) {
});
});
router.post('/v1/txproposals/:id/send/', function(req, res) {
getServerWithAuth(req, res, function(server) {
req.body.txProposalId = req.params['id'];
server.sendTx(req.body, function(err, txp) {
if (err) return returnError(err, res, req);
res.json(txp);
res.end();
});
});
});
// TODO Check HTTP verb and URL name
router.post('/v1/txproposals/:id/broadcast/', function(req, res) {
getServerWithAuth(req, res, function(server) {

Loading…
Cancel
Save