Projected blocks API should accept "txId" as query parameter.

This commit is contained in:
Simon Lindh 2019-07-26 17:55:41 +03:00
parent 32623988ab
commit b561137962

View File

@ -57,8 +57,8 @@ class Routes {
public async getProjectedBlocks(req, res) { public async getProjectedBlocks(req, res) {
try { try {
let txId: string | undefined; let txId: string | undefined;
if (req.params.txId && /^[a-fA-F0-9]{64}$/.test(req.param.txId)) { if (req.query.txId && /^[a-fA-F0-9]{64}$/.test(req.query.txId)) {
txId = req.params.txId; txId = req.query.txId;
} }
const result = await projectedBlocks.getProjectedBlocks(txId, 6); const result = await projectedBlocks.getProjectedBlocks(txId, 6);
res.send(result); res.send(result);