Fix pool get blocks API undefined start block behavior

This commit is contained in:
nymkappa
2022-03-16 20:19:39 +01:00
parent 5326f34f66
commit 32f38cddba
4 changed files with 14 additions and 8 deletions

View File

@@ -553,7 +553,7 @@ class Routes {
try {
const poolBlocks = await BlocksRepository.$getBlocksByPool(
parseInt(req.params.poolId, 10),
parseInt(req.params.height, 10) ?? null,
req.params.height === undefined ? undefined : parseInt(req.params.height, 10),
);
res.header('Pragma', 'public');
res.header('Cache-control', 'public');