Merge branch 'master' into junderw/search-blocktime

This commit is contained in:
Felipe Knorr Kuhn
2022-11-07 07:21:14 -08:00
committed by GitHub
263 changed files with 83721 additions and 17983 deletions

View File

@@ -239,6 +239,12 @@ class MiningRoutes {
public async $getBlockAudit(req: Request, res: Response) {
try {
const audit = await BlocksAuditsRepository.$getBlockAudit(req.params.hash);
if (!audit) {
res.status(404).send(`This block has not been audited.`);
return;
}
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 3600 * 24).toUTCString());