Fix pagination on /mining/blocks
This commit is contained in:
@@ -659,7 +659,8 @@ class Routes {
|
||||
|
||||
public async getBlocksExtras(req: Request, res: Response) {
|
||||
try {
|
||||
res.json(await blocks.$getBlocksExtras(parseInt(req.params.height, 10), 15));
|
||||
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
|
||||
res.json(await blocks.$getBlocksExtras(height, 15));
|
||||
} catch (e) {
|
||||
res.status(500).send(e instanceof Error ? e.message : e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user