mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Projected blocks API should accept "txId" as query parameter.
This commit is contained in:
parent
32623988ab
commit
b561137962
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user