add express endpoint for sending tx
This commit is contained in:
parent
092c3ff37e
commit
0a5e144f93
|
@ -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…
Reference in New Issue