Added /api/v1/blocksExtras endpoint

This commit is contained in:
nymkappa
2022-02-08 15:47:43 +09:00
parent 83074b70fe
commit a79609ff5c
6 changed files with 179 additions and 45 deletions

View File

@@ -564,6 +564,14 @@ class Routes {
}
}
public async getBlocksExtras(req: Request, res: Response) {
try {
res.json(await blocks.$getBlocksExtras(parseInt(req.params.height, 10)))
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async getBlocks(req: Request, res: Response) {
try {
loadingIndicators.setProgress('blocks', 0);